Filter percolators by attributes

Hello together,

I would like to filter my percolators by attributes like category .

Example I tried:

POST /test/test
{
"query" : {
"match" : {
"message" : "buy"
}
},
"category": "Sales"
}

GET /test/test/_search
{
"query" : {
"percolate" : {
"field" : "query",
"document" : {
"message" : "I buy a car"
}
}
},
"filter" : {"term" : {"category" : "Sales"}}
}
}

PUT /test
{
"mappings": {
"test": {
"properties": {
"message": {
"type": "text"
},
"category":{
"type":"text"
},
"query": {
"type": "percolator"
}}}
}

I am getting an error when trying to GET the results. Is that the right way to fulfill my intention.
The aim is to get only the percolators with category "Sales". Thanks in advance.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.