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

Return entire hash when indexing document #44

Open
primeosu opened this issue Nov 14, 2012 · 1 comment
Open

Return entire hash when indexing document #44

primeosu opened this issue Nov 14, 2012 · 1 comment

Comments

@primeosu
Copy link

Not sure if this would affect other methods, but it would be nice to get the entire hash returned when indexing a document instead of just the "_id". Reason being is that I need to see the "_version" and "matches" when doing percolation.

For example:

p client.index( {'name' => 'test', 'foo' => 'bar'}, :id => 1, :percolate => '*' )

Returns "1" when I'd prefer it to return {"ok"=>true, "_index"=>"test_index", "_type"=>"test", "_id"=>"1", "_version"=>1, "matches"=>["test_query"]}. This is especially important when doing percolation at index time.

@grantr
Copy link
Owner

grantr commented Nov 14, 2012

It makes sense to return the hash now, but in earlier versions of elasticsearch there was no useful information besides the id.

I don't think rubberband itself relies on the return value, but it would be a breaking change.

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

No branches or pull requests

2 participants