I'm new to Solr search and trying to get a grasp on how to handle ordering of results. I'm using Ruby on Rails together with the Sunspot gem to interface with Solr.
I have an Article model, that has the following fields that are indexed:
text Title
text AuthorNames
integer NumberOfReviews
I'd like to be able to perform a search on Solr where:
- Exact title matches are returned before anything else
- Positive weighting is given proportionally to Articles with a larger NumberOfReviews
Ideally, I'd also like to be able to do something like Google where near misses and typos are also found to a certain extent, and alternative searches are suggested when it seems like the user might have made a mistake, though I'm not sure this is possible.
Can anyone help or point me in the right direction? Thanks in advance!