[
https://issues.apache.org/jira/browse/LUCENE-10570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575492#comment-17575492
]
Chris M. Hostetter commented on LUCENE-10570:
---------------------------------------------
FWIW: I've found that in practice, this kind of Presearcher wrapper is a good
"last resort" safety net to prevent these queries from making into the Monitor
– but because of how the Monitor API works to add+commit an entire batch all at
once, it's really only efficient to register large batches of {{MonitorQuery}}
, but if the Presearcher throws an exception, the entire batch fails.
What I've wound up doing is using this kind of Presearcher wrapper in my
Monitor, but also pre-processing the queries (and redundently running them
through the Presearcher individually before assembling my batches) to check
them in advance.
> Monitor Presearcher to reject registration of "ANYTOKEN" queries
> -----------------------------------------------------------------
>
> Key: LUCENE-10570
> URL: https://issues.apache.org/jira/browse/LUCENE-10570
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/monitor
> Reporter: Chris M. Hostetter
> Priority: Major
> Attachments: LUCENE-10570.patch
>
>
> I'm starting to do some work with Monitor, and one of the things i realized I
> was going to want is an easy way to detect Queries that result in
> {{ANYTOKEN}} style QueryIndex documents – requiring a "forward search" test
> against every future {{match(Document)}} call.
> The simplest solution I could come up with is a Presearcher "wrapper" –
> something that might be generally useful for other users – but I'm certainly
> open to other approaches.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]