[
https://issues.apache.org/jira/browse/SOLR-11865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16503360#comment-16503360
]
David Smiley commented on SOLR-11865:
-------------------------------------
Okay Markus... though I hesitate to make *every* member protected/public so
I'll upload something and you can tell me if it meets your purposes.
[~bruno.roustant] while looking at analyzeQuery/getAnalyzedQuery I noticed a
change in behavior. First I was wondering what we changed, and then I saw what
seems to me a pointless method extraction splitQueryTermsWithAnalyzer so I
inlined it (it's not like analyzeQuery was so long as to warrant that). Then I
thought I liked the older code here better -- no need to build up the query
terms into an ArrayList; the StringBuilder was totally fine. Then I looked
closer at the "QUERY_EXACT_JOINER" and saw it joins by a space. Well the
current code does *not* do this. I think this will result in a change of
behavior. The current QueryElevationComponent behavior will look at two
queries, "foo bar" and "foobar" and come up with the same result for both. If
there are two configured elevated queries this way, I think this will result in
an error; which I don't care about to retain either way. More importantly, at
search time, a query for "foo bar" could match a configured elevated query
"foobar". Your change here will *not* do this. Right? So I think we can keep
the current code/behavior and make protected so you can subclass as you need to.
> Refactor QueryElevationComponent to prepare query subset matching
> -----------------------------------------------------------------
>
> Key: SOLR-11865
> URL: https://issues.apache.org/jira/browse/SOLR-11865
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SearchComponents - other
> Affects Versions: master (8.0)
> Reporter: Bruno Roustant
> Priority: Minor
> Labels: QueryComponent
> Fix For: master (8.0)
>
> Attachments:
> 0001-Refactor-QueryElevationComponent-to-introduce-Elevat.patch,
> 0002-Refactor-QueryElevationComponent-after-review.patch,
> 0003-Remove-exception-handlers-and-refactor-getBoostDocs.patch,
> SOLR-11865.patch, SOLR-11865.patch
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> The goal is to prepare a second improvement to support query terms subset
> matching or query elevation rules.
> Before that, we need to refactor the QueryElevationComponent. We make it
> extendible. We introduce the ElevationProvider interface which will be
> implemented later in a second patch to support subset matching. The current
> full-query match policy becomes a default simple MapElevationProvider.
> - Add overridable methods to handle exceptions during the component
> initialization.
> - Add overridable methods to provide the default values for config properties.
> - No functional change beyond refactoring.
> - Adapt unit test.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]