# (no subject)

**URL:** <https://discuss.elastic.co/t/no-subject/4765>\
**Category:** Elasticsearch\
**Created:** [July 4, 2011, 8:06am UTC](https://discuss.elastic.co/t/no-subject/4765 "2011-07-04T08:06:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmet\_Arslan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmet_arslan/32/3152_2.png) [@Ahmet\_Arslan](https://discuss.elastic.co/u/Ahmet_Arslan)\
**Post date:** [July 4, 2011, 8:06am UTC](https://discuss.elastic.co/t/no-subject/4765/1 "2011-07-04T08:06:20Z")

</div>

Hello,

It seems that PercolateResponse returns only the names of the matched queries. There is no built-in way to return fields attached to the registered query. (e.g. color field in examples). Am I correct?

Currently I am issuing an additional get operation (using query name) to retrieve field values (color : blue) .

Is there a better way?

Thanks,  
Ahmet

---

<div class="post-metadata">

**Author:** ![Ahmet\_Arslan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmet_arslan/32/3152_2.png) [@Ahmet\_Arslan](https://discuss.elastic.co/u/Ahmet_Arslan)\
**Post date:** [July 4, 2011, 8:07am UTC](https://discuss.elastic.co/t/no-subject/4765/2 "2011-07-04T08:07:59Z")

</div>

> It seems that PercolateResponse returns only the names of  
> the matched queries. There is no built-in way to return  
> fields attached to the registered query. (e.g. color field  
> in examples). Am I correct?
> 
> Currently I am issuing an additional get operation (using  
> query name) to retrieve field values (color : blue) .
> 
> Is there a better way?

I am sorry, I hit the send button accidentally. Without writing the title of the message.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 4, 2011, 7:25pm UTC](https://discuss.elastic.co/t/no-subject/4765/3 "2011-07-04T19:25:28Z")

</div>

When you say field values what do you mean? Yea, your assumption is correct, only the queries that matched are returned.

On Monday, July 4, 2011 at 11:06 AM, Ahmet Arslan wrote:

> Hello,
> 
> It seems that PercolateResponse returns only the names of the matched queries. There is no built-in way to return fields attached to the registered query. (e.g. color field in examples). Am I correct?
> 
> Currently I am issuing an additional get operation (using query name) to retrieve field values (color : blue) .
> 
> Is there a better way?
> 
> Thanks,  
> Ahmet

---

<div class="post-metadata">

**Author:** ![Ahmet\_Arslan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ahmet_arslan/32/3152_2.png) [@Ahmet\_Arslan](https://discuss.elastic.co/u/Ahmet_Arslan)\
**Post date:** [July 5, 2011, 8:36am UTC](https://discuss.elastic.co/t/no-subject/4765/4 "2011-07-05T08:36:26Z")

</div>

Thanks for the response, Shay.

: When you say field values what do you mean?

I mean the fields attached to the percolator query. For instance  
"color" : "blue", in the following example.

curl -XPUT localhost:9200/\_percolator/test/kuku -d '{  
"color" : "blue",  
"query" : {  
"term" : {  
"field1" : "value1"  
}  
}  
}'

If a document matches the query kuku, I want to retrieve the 'color : blue' as well as 'kuku'.

: Yea, your assumption is  
: correct, only the queries that matched are returned.

I have a use-case where I add several fields / meta-data (owner of the query for example) to the queries. I want to return them in the response as well as name of the matching query.

I am going to take some action according to these meta-data like fields.

Do you think is there a workaround to save and retrieve such additional data in Percolator API?

Thanks,  
Ahmet

---

<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, 4:01am UTC](https://discuss.elastic.co/t/no-subject/4765/5 "2017-07-06T04:01:48Z")

</div>


