Have you looked at the Term Query Parser (_not_ the TermS Query Parser)
or Raw Query Parser? 

https://lucene.apache.org/solr/guide/8_4/other-parsers.html

NOTE: these perform _no_ analysis, so you have to give them the exact term...

These are pretty low level, and if they’re “fast enough” you won’t have to do
any work. You could do some Lucene-level coding I suspect to improve that,
depends on whether you think those are fast enough…

Best,
Erick


> On Dec 5, 2020, at 5:04 AM, Colvin Cowie <colvin.cowie....@gmail.com> wrote:
> 
> Hello,
> 
> I was just wondering. If I don't care about the number of matches for a
> query, let alone what the matches are, just that there is *at least 1*
> match for a query, what's the most efficient way to execute that query (on
> the /select handler)? (Using Solr 8.7)
> 
> As a general approach for a query is "rows=0&sort=id asc" the best I can
> do? Is there a more aggressive short circuit that will stop a searcher as
> soon as it finds a match?
> 
> For a specific case where the query is for a single exact term in an
> indexed field (with or without doc values) is there a different answer?
> 
> Thanks for any suggestions

Reply via email to