I am trying to use the new version of percolator coming with ES 1.x. It
seems the new percolator only works with match query, which, to my
knowledge, does not accept multiple query strings. Wondering if there is a
way I could use a query string list in a query which can work with the new
percolator.
What I am trying to do is to register a query in the percolator which
matches the ID of each inbound document against a list of given IDs [id1,
id2, id3].
A work-around I found is adding all IDs into the query string, i.e., "id1
id2 id3", to form a match query like the following, so that any document
with one of the 3 IDs will make the percolator think this query as a match:
{
"_index" : "my_idx",
"_type" : ".percolator",
"_id" : "my_query_id",
"_score" : 1.0,
"_source" : {
"query":{
"match":{
"id":{
"query":"id1 id2 id3",
"type":"boolean"
}
}
}
}
}
It seems a dumb solution to me, wondering if anybody could help me come out
a more more elegant solution, for exampling using inFilter or inQuery or
anyway be able to pass the ID list as a list into a query that can work
with the new percolator.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/eb3ad7bf-a21e-4714-a53e-ea998a5ac9ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.