From the other thread, the fact that something takes 30% cpu out of the
execution time does not reflect if its slow or not :). 30% time taken from
20ms is not that much, for example ;).
As clinton said, most times, it makes sense to just get the _source, with
the exception of very large single fields. Assuming you have no stored
fields, then asking for specific fields will cause them to be parsed and
extracted from the source. This will cause the source to be parsed and for
the fields to be extracted. On the other hand, if you just ask for the
_source, it will be loaded and returned as is all the way back.
On Mon, Sep 19, 2011 at 8:09 PM, davrob2 firstname.lastname@example.org wrote:
That's interesting, I had assumed from this post
that if I was needing about 20 columns, out of the 70 or so I have
indexed I should use the field value, certainly when I only need to
return 5 or so fields I find the time to query is reduced by about
In this case, 20 or so fields, I'm in two minds, whether to get the
_source and return it more-or-less as it is to the browser. Or
whether to parse the source into a smaller dataset, giving the browser
less to parse and reducing network time.
thanks for you insight about the disk seek.
On Sep 19, 4:09 pm, Clinton Gormley cl...@traveljury.com wrote:
Yes I do have source by default, but for performance reason I don't
want to get source and parse the fields.
This is usually a false economy. Lucene needs to do a disk seek for each
field that it returns, as opposed to just one for the _source field.
Usually the only time it makes sense to use separately stored fields
instead of the _source is when you have very large docs, and you only
want (eg) a last_modified date out of your doc.