Hi guys,
I seem to be having an issue with percolation when using this API on an existing document.
I am using an example exactly the same same as in the documentation.
Here is my index..
curl -XPUT 'localhost:9200/my-index' -d '{
"mappings": {
"my-type": {
"properties": {
"message": {
"type": "string"
}
}
}
}
}'
Register a query with the percolator
curl -XPUT 'localhost:9200/my-index/.percolator/1' -d '{
"query" : {
"match" : {
"message" : "bonsai tree"
}
}
}'
Insert in the index(3 documents)
curl -XPUT 'localhost:9200/my-index/my-type/1' -d '{
"my-type" : {
"message" : "bonsai tree hello"
}
}'curl -XPUT 'localhost:9200/my-index/my-type/2' -d '{
"my-type" : {
"message" : "bonsai hello"
}
}'curl -XPUT 'localhost:9200/my-index/my-type/3' -d '{
"my-type" : {
"message" : "bonsai tree"
}
}'
Percolate exsiting document
curl -XGET 'localhost:9200/my-index/my-type/1/_percolate'
curl -XGET 'localhost:9200/my-index/my-type/2/_percolate'
curl -XGET 'localhost:9200/my-index/my-type/3/_percolate'
All these 3 give me no match what so ever.
Any help with this please.