Is Percolate with multiterms possible in ES


(Chetana) #1

I have a page with different sections say abstract, 'see also' etc. I want
to register queries with some word appearing in abstract field and some
other word appearing in 'see also' field

So my registerer query looks like :
String source = {"query": {"term":{ "abstract" :"laptop",
"seealso": "notebook"}}}
IndexResponse resp = client.prepareIndex("_percolator", "Test",
"laptop").setSource(source).execute().get();

I see the new indexed document when I run
curl -XGET
http://localhost:9200/_percolator/_search?pretty=true&q={'matchAll':{''}}

Now I want to do percolate request on either abstract or/and seealso
section. But I get the results only when the abstract field matches
PercolateRequest request = client.preparePercolate("Test",
"test").request();
request.source("{"doc":{"abstract" :"laptop", "seealso":
"notebook"}"); -- gives result

// request.source("{"doc":{"seealso":
"notebook"}"); --does not give results
// request.source("{"doc":{"abstract" :"lappy", "seealso":
"notebook"}"); --does not give results

PercolateResponse res = client.percolate(request).get();

Please let me know is there a way to achieve this functionality using
percolator?

Thanks

--
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/059d7abd-d532-4bc1-83aa-0421e0073e69%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(system) #2