Choosing an autonomous search server with a custom ranking function, inter-page search

I am looking at various options for selecting a search server for a project in which I participate. The search server is used to get results on a dating site built in Rails, in which the search provides all the "matchmaking" -magic.

Typical queries include ranking documents / results using an expression (in pseudo-code):

  • Rating order:
    • +50 if has_image attribute true
    • +10 if has_boost attribute is true
    • +50 if latitude / longitude is within 40 miles of [point]
    • +20 if latitude / longitude is within 80 miles [dot]
    • - (distance from the attribute 'age' to 30)
  • Filter by:
    • Age attribute between 25 and 35
    • Attribute 'sex' equals 'male'

By default, I don’t need the full-text features of most search engines, and I don’t need the full documents that I need to get - just a unique identifier.

The nature of the project gives for a search server with the following properties:

  • Fair rating
  • Evaluate Results Based on a Custom Function
  • Attribute Filters
  • Scalability and speed
  • Free

I found Sphinx, Solr and ElasticSearch, but all of them (as far as I can see) are built and optimized for full-text search, with ES and Solr built on Lucene, and I don’t know what works best for searching filters / attributes.

My questions:

  • Which of these servers would you prefer and why?
  • Did I miss other obvious choices?
+3
4

ElasticSearch .

/ / : http://www.elasticsearch.com/docs/elasticsearch/rest_api/query_dsl/

, 100 + , .

, - . ES River , , post commit.

, , ElasticSearch 1 . , , Solr. . .

, .

+4

, Solr :

Solr ( , Solr 1.4.1, ), , .

Solr .

.

Solr, .

Free

Solr - Apache - .

+5

. . SQL, SELECT; , CASE, ORDER BY.

.

, , - PostgreSQL.

+1

, , , ​​ Solr ES, , , "-", , , .

, , , , ... , .

0

Source: https://habr.com/ru/post/1773377/


All Articles