Hi, Steven.
What about
q=search-text some-other-limits {!terms f=UNIQUE_MODELS
v=$um}&um=19,20,9532,..
Although it's quite limited without POST. Also, note there are many traps
in this syntax, check debugQuery output thoroughly.

see
https://solr.apache.org/guide/7_3/other-parsers.html#terms-query-parser
https://solr.apache.org/guide/7_3/local-parameters-in-queries.html#parameter-dereferencing


On Fri, Apr 14, 2023 at 3:18 PM 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
>


-- 
Sincerely yours
Mikhail Khludnev
https://t.me/MUST_SEARCH
A caveat: Cyrillic!

Reply via email to