# Is Percolate with multiterms possible in ES

**URL:** <https://discuss.elastic.co/t/is-percolate-with-multiterms-possible-in-es/14975>\
**Category:** Elasticsearch\
**Created:** [December 20, 2013, 12:29pm UTC](https://discuss.elastic.co/t/is-percolate-with-multiterms-possible-in-es/14975 "2013-12-20T12:29:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [December 20, 2013, 12:29pm UTC](https://discuss.elastic.co/t/is-percolate-with-multiterms-possible-in-es/14975/1 "2013-12-20T12:29:17Z")

</div>

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':{''}](http://localhost:9200/_percolator/_search?pretty=true&q=%7B'matchAll':%7B''%7D)}

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](mailto: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](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](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:59am UTC](https://discuss.elastic.co/t/is-percolate-with-multiterms-possible-in-es/14975/2 "2017-07-06T01:59:57Z")

</div>


