You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by root23 <s....@gmail.com> on 2018/05/29 19:00:19 UTC

Field list vs getting everything

Hi all ,
We have in our solr schema around 110 fields and then around 200 dynamic
fields. 
Untill now whenever we query solr we will just blindly get everything. Even
if our calling application dont need all the fields to send back to the
client.

So i thought that may be if i ask only a subset of all the fields from solr
using the df attribute, for each query it should be fast. so instead of
getting everything i am not asking for around 65 fields and 100 dynamic
fields. 
In theory i am asking around 50% less from solr.

I was hoping that this will be fast but it seems like didnt make much
difference the response time is pretty much same.

Does anyone know if my theory is correct or not ? I was thinking if i ask
less data from solr its less work for solr and then also less data to
transfer on the wire.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Field list vs getting everything

Posted by root23 <s....@gmail.com>.
Yes i meant fl. 
So essentially if i ask in the fl list for 10 fields vs all the fields have
no effect in terms of the amount of work solr has to do ?



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Re: Field list vs getting everything

Posted by Alexandre Rafalovitch <ar...@gmail.com>.
'df' is Default Field parameter and does not affect the fields
returned. You probably meant 'fl'.

Just not listing field in 'fl' will not have much effect, apart from
serialization time and network time. Which may help your real users if
your middleware just passes the results to the browser.

However, there is also a settings for Lazy Loading the fields, which
is supposed to help:
https://lucene.apache.org/solr/guide/7_3/query-settings-in-solrconfig.html

The reasons is not on by default - I believe - is because there are
issues with caching partial documents in memory. I am not 100% sure on
that though.

Regards,
   Alex.

On 29 May 2018 at 15:00, root23 <s....@gmail.com> wrote:
> Hi all ,
> We have in our solr schema around 110 fields and then around 200 dynamic
> fields.
> Untill now whenever we query solr we will just blindly get everything. Even
> if our calling application dont need all the fields to send back to the
> client.
>
> So i thought that may be if i ask only a subset of all the fields from solr
> using the df attribute, for each query it should be fast. so instead of
> getting everything i am not asking for around 65 fields and 100 dynamic
> fields.
> In theory i am asking around 50% less from solr.
>
> I was hoping that this will be fast but it seems like didnt make much
> difference the response time is pretty much same.
>
> Does anyone know if my theory is correct or not ? I was thinking if i ask
> less data from solr its less work for solr and then also less data to
> transfer on the wire.
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html