Specifying search fields in search request

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Specifying search fields in search request

Ajay Divakaran
Hi all,

I'm using ES version 0.90.7.

My requirement is to fetch all the fields of the JSON documents that I search/filter for. Is there a performance difference in specifying all the field names in the search request vs not specifying the 'fields' parameter.

By not specifying the fields parameter I see the response time to be relatively faster.

Could someone explain this behavior?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f5bc301b-85d4-4a66-861e-3b57071e1997%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Specifying search fields in search request

joergprante@gmail.com
Each field given in search request adds up to search performance because the field must be searched, weighted, scored, and ranked.

I recommend using _all field, or combining fields into fewer fields with "copy_to", and use as few fields as possible for search.

Jörg

On Sun, Nov 23, 2014 at 10:56 AM, Ajay Divakaran <[hidden email]> wrote:
Hi all,

I'm using ES version 0.90.7.

My requirement is to fetch all the fields of the JSON documents that I search/filter for. Is there a performance difference in specifying all the field names in the search request vs not specifying the 'fields' parameter.

By not specifying the fields parameter I see the response time to be relatively faster.

Could someone explain this behavior?

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f5bc301b-85d4-4a66-861e-3b57071e1997%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoF__y0Ar8NuzmhmXYMXiVcGokx4x8aV5D_-sNpHYrUzPg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Specifying search fields in search request

Ajay Divakaran
Jorg
Thanks for your reply.
Just to clarify the 'fields' that I was referring was for retrieval not against which to search.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6224fc46-8c23-43e6-b1ff-c11fd20cd0d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Specifying search fields in search request

Ajay Divakaran
In reply to this post by joergprante@gmail.com
Jorg
Thanks for your reply.
Just to clarify the 'fields' that I was referring was for retrieval not against which to search.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fe90ecb6-ae17-4234-b633-ae1c1dbfa2a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Specifying search fields in search request

Ivan Brusic
It all depends on how many fields and how big they are. Retrieving a few specific fields might be faster in cases, but in general, each field is another seek in Lucene.  Values are not retrieved at the same time. If you are going to get all the fields, just use the source.

-- 
Ivan

On Sun, Nov 23, 2014 at 10:15 AM, Ajay Divakaran <[hidden email]> wrote:
Jorg
Thanks for your reply.
Just to clarify the 'fields' that I was referring was for retrieval not against which to search.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/fe90ecb6-ae17-4234-b633-ae1c1dbfa2a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBh04RxjPTk%2B_jFanKbh%2BhA19TaRWHV%2BL2PZRrFZqZi6A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.