How can I get percolation to work?


(IronMike) #1

Newbie question, I am not very clear on how percolation works.

I have a transportclient using JAVA API, I indexed about 50,000 docs.
My docs have the following

MyIndex/indexType/id{

title = t,
content = this is a long content,
create = created date,
author = Mike
.....
}

From Sense Client, I did

PUT myIndex/.percolator/1
{
"query": {
"match_phrase": {
"content": "sky diving"
}
}
}

So the above registers the percolator, and now I want all the documents that match this query, In other words, give me all the documents that have sky diving in it's content field? Am I missing something?

GET /myIndex/medidoc/_percolate

It returns this? Its asking me to supply a document to percolate, I have seen in the tutorial, but I don't understand it. What is the document like, what if I don't want to provide a document?

{
"took": 38,
"_shards": {
"total": 5,
"successful": 4,
"failed": 1,
"failures": [
{
"index": "myIndex",
"shard": 2,
"reason": "BroadcastShardOperationFailedException[[myIndex][2] ]; nested: RemoteTransportException[[node-2][inet[/192.168.1.103:9301]][percolate/s]]; nested: PercolateException[failed to percolate]; nested: ElasticsearchIllegalArgumentException[Nothing to percolate]; "
}
]
},
"total": 0,
"matches": []
}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/66c1c7ff-14fb-41c0-9ee8-b2774fbb57ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(system) #2