Terms lookup mechanism with multiple lookup docs


(Valery Ayala) #1

Is it possible to use this feature with a lookup on multiple documents
(multiple IDs) to supply the terms?
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-terms-filter.html#_terms_lookup_mechanism

I tried this
"terms": {
"user": {
"index": "users",
"type": "user",
"id": [1,2,3,4],
"path": "followers"
}
}

which was accepted as legit syntax, but only ONE of the ids was actually
used within the terms filter (the last one in the list).

So far the only way I can come up with for doing this is using a bool
filter and stuffing a bunch of these terms lookups into the "should" clause
to accomplish the equivalent of multiple docs lookup.
Is there a more efficient way?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/783c6825-c6db-4584-80ee-4dc710730c43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2