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

_source includes/excludes has no effect when getting documents by ID #2829

Closed
radu-gheorghe opened this issue Mar 29, 2013 · 4 comments
Closed

Comments

@radu-gheorghe
Copy link
Contributor

Initial problem report:

As far as I've tested, the "includes" and "excludes" options for the _source field have no effect - I always get the whole source. Here's a gist for recreating:
https://gist.github.com/radu-gheorghe/5265495

I'm on 64-bit Ubuntu and I've used the .deb packages of 0.19.7 and 0.90.0RC1 with the same results.

@clintongormley's comments (thanks!):

Hmm - it doesn't work for get-by-id. It works for search though.
Flushing the index helped, so it looks like its a translog thing

@thomasst
Copy link

thomasst commented Apr 8, 2013

Same problem here. Also, when I set the _source field to "enabled": False and create a custom stored property called original then I can usually retrieve it via GET ?fields=original, but never via search using "fields": ["original"]. In some cases (which I don't know how yet how to reproduce) the original field would completely disappear, even in GET requests.

@thomasst
Copy link

thomasst commented Apr 8, 2013

Also, saying "_source": { "includes": ["original" ] } stores all fields (not just original), but if I flush the index then all fields (including original) are gone.

@spinscale
Copy link
Contributor

Hey,

I can confirm, that this is a problem with translog as clint already mentioned. Currently entries from the translog are always returned as is by the ShardGetService. So, if the data is read from the translog and not from the indexreader (before a refresh or a flush), the problem occurs.

I have created a first preliminary and incomplete try to fix this, which I dont like very much and hope for input of other developers. See spinscale@4fccc68

@spinscale
Copy link
Contributor

Forgot to close by commit. Closed by a694e97

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

Successfully merging a pull request may close this issue.

3 participants