I'm looking into the different options for choosing a search server for a project I'm involved in. The search server is used to power results on a dating website built in Rails, in which the search provides all the 'matchmaking'-magic.
Typical queries would involve ranking documents/results using an expression (in pseudo-code):
- Order by ranking:
- +50 if has_image attribute is true
- +10 if has_boost attribute is true
- +50 if latitude/longitude is within 40 miles from [point]
- +20 if latitude/longitude is within 80 miles [point]
- -(distance from attribute 'age' to 30)
- Filter by:
- Attribute 'age' between 25 and 35
- Attribute 'sex' equals 'male'
Per default I'm not needing the full-text features of most of the search servers out there, and I do not need the full documents to be retrieved - just a unique ID.
The nature of the project yields for a search-server with the following properties:
- Spartial ranking
- Ranking of results based on a custom function
- Attribute filters
- Scalable and fast
- Free
I've found Sphinx, Solr and ElasticSearch, but all of these are (as far as I see) built and optimized for full-text searching, with both ES and Solr built on Lucene, and I don't know what would perform best for filter/attribute heavy searching.
My questions:
- Which of these servers would you prefer and why?
- Have I missed any other obvious choices?