(no subject)


(Ahmet Arslan) #1

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


(Ahmet Arslan) #2

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.


(Shay Banon) #3

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


(Ahmet Arslan) #4

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


(system) #5