Did you try using q.op=OR as request parameter? It should override the default 
boolean operator. 


> On 14 Apr 2023, at 15:15, Steven White <swhite4...@gmail.com> wrote:
> 
> Hi everyone,
> 
> I have the following very long query that I need to send to Solr:
> 
>> search-text some-other-limits UNIQUE_MODELS:(19 OR 20 OR 9532 OR ...)
> 
> See how I'm narrowing my query to a list of values limited to the field
> UNIQUE_MODELS ?
> 
> The number of items that can be passed to UNIQUE_MODELS can be very large
> as such I'm hitting the URL character limit.
> 
> This is legacy code and it is not feasible to change the HTTP from GET to
> POST.  Furthermore, the default boolean operator is AND and that too I
> cannot change it to OR.
> 
> Given the above, I was thinking if there is a way to shorten the request
> I'm sending to Solr by eliminating the ORs inside UNIQUE_MODELS.  That is,
> build the Solr request such as telling Solr to use OR for items listed in
> UNIQUE_MODELS, without repeating OR, but keep using the default AND for
> everything else that could be part of this query.
> 
> I.e.: can I say: UNIQUE_MODELS:(<user-OR> 19 20 9532 ...)
> 
> Is there a Solr syntax to do this?
> 
> Thanks in advance.
> 
> Steven

Reply via email to