As explained in the dochttp://www.elasticsearch.org/guide/reference/api/percolate.html,
when I store a query with _percolator, eg:
curl -XPUT localhost:9200/_percolator/test/kuku -d '{
"color" : "blue",
"query" : {
"term" : {
" field1" : "value1"
}
}
}'
This query will be run when I percolate a document on the 'test' index, but
if I want to restrict it to the type 'foo' of the 'test' index the only
solution is to add a type in the query :
curl -XPUT localhost:9200/_percolator/test/kuku -d '{
"type":"foo",
"color" : "blue",
"query" : {
"term" : {
" field1" : "value1"
}
}
}'
And when adding the document use
curl -XGET localhost:9200/test/type1/_percolate -d '{
"doc" : {
"field1" : "value1"
},
"query" : {
"term" : {
"type" : "foo"
}
}
}'
Is there another solution ?
I tried
curl -XPUT localhost:9200/_percolator/test/foo/kuku
but it does not work.
--