Large query size in Solr 8.3.0

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

Large query size in Solr 8.3.0

vishal patel-2

Which query parser is used if my query length is large?
My query is https://drive.google.com/file/d/1P609VQReKM0IBzljvG2PDnyJcfv1P3Dz/view


Regards,
Vishal Patel
Reply | Threaded
Open this post in threaded view
|

Re: Large query size in Solr 8.3.0

Vincenzo D'Amore
Hi, I don't think query size can affect the kind of the parser chosen. I
remember there is a maximum number of boolean clause  (maxBooleanClauses),
but this a slight different thing.
If the query is too large, you can have an http error (bad request?), I
don't remember, well just change the http method used (instead of GET use
POST)

On Tue, May 19, 2020 at 4:16 PM vishal patel <[hidden email]>
wrote:

>
> Which query parser is used if my query length is large?
> My query is
> https://drive.google.com/file/d/1P609VQReKM0IBzljvG2PDnyJcfv1P3Dz/view
>
>
> Regards,
> Vishal Patel
>


--
Vincenzo D'Amore
Reply | Threaded
Open this post in threaded view
|

Re: Large query size in Solr 8.3.0

Alexandre Rafalovitch
In reply to this post by vishal patel-2
Does this actually work? This individual ID matching feels very
fragile attempt at enforcing the sort order and maybe represents an
architectural issue. Maybe you need to do some joins or graph walking
instead. Or, more likely, you would benefit from over-fetching and
just sorting on the ids on the frontend, since you have those IDs
already. You are over-fetching already anyway (rows=250), so you don't
seem to worry that much about payload size.

But, apart from that:
1) Switch from GET to POST
2) 'fl' field list and others after it are probably not very mutable,
this can go into defaults for the request handler (custom one perhaps)
3) You don't seem to use filter queries. But you also have a lot of
binary flags that may benefit from being pushed into 'fq' and improve
caching/minimize score calculations. You could also have not-cached
FQs if you think they will not be reused
4) If you have sets of params that repeat often but not always, you
could do some variable substitutions to loop them in with paramSets
5) Move the sorting query into a boost query, just for clarity of intent

Regards,
  Alex.


On Tue, 19 May 2020 at 10:16, vishal patel
<[hidden email]> wrote:
>
>
> Which query parser is used if my query length is large?
> My query is https://drive.google.com/file/d/1P609VQReKM0IBzljvG2PDnyJcfv1P3Dz/view
>
>
> Regards,
> Vishal Patel