I'm trying to use Elasticsearch as a datastore for rules (modeled as
documents). The challenge is that a search returns many documents, which
means many "rules" matched the query - I am trying to find a way to get
Elasticsearch to rank them automagically.
For example, I have four documents
team: a,b (multivalued fields)
(remember that not-team means that a person is NOT in team )
Now,searching for "team:a" should return three documents 1,2,4 (note that 4
is also returned, since it does not say anything about "a" which implies a
match) - but ranked with 1 >> 2 >> 4 starting from most specific to least
I do expect to have a validation layer in my application as well, but it
would be great if this can be done at the Elasticsearch level. This would
be perfect as a NoSQL like application of Elasticsearch.
could someone point me in the right direction ?