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

Comments

Projects
None yet
3 participants
@radu-gheorghe
Copy link
Contributor

radu-gheorghe commented Mar 29, 2013

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member

spinscale commented Apr 9, 2013

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

This comment has been minimized.

Copy link
Member

spinscale commented Apr 30, 2013

Forgot to close by commit. Closed by a694e97

@spinscale spinscale closed this Apr 30, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.