Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add size option to percolate api #3440

Closed
martijnvg opened this issue Aug 5, 2013 · 0 comments
Closed

Add size option to percolate api #3440

martijnvg opened this issue Aug 5, 2013 · 0 comments

Comments

@martijnvg
Copy link
Member

Add a size option to the percolate api in order to limit the number of matches being returned:

curl -XGET 'localhost:9200/my-index/my-type/_percolate' -d '{
   "size" : 10,
   "doc" : {...}
}'

In the above request no more than 10 matches will be returned. The count field will still return the total number of matches the document matched with.

The size option is not applicable for the count percolate api.

@ghost ghost assigned martijnvg Aug 5, 2013
martijnvg added a commit to martijnvg/elasticsearch that referenced this issue Aug 5, 2013
…es being returned

The `size` option both applies for the percolate and the count percolate api. If `size` is used in the percolate count api, the percolate execution is short circuited if on the shard level enough matches have been found. This short circuit mechanism can also be used for the percolate api with the `short_circuit` option that is available only in the percolate api. The `short_circuit` options defaults to false.

By default all matching queries are returned / counted in both percolate apis, so this limiting isn't active

Closes elastic#3440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant