[
https://issues.apache.org/jira/browse/LUCENE-7355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15351156#comment-15351156
]
Adrien Grand commented on LUCENE-7355:
--------------------------------------
I propose the following plan:
- add {{TokenStream tokenStreamMultiTerm(String fieldName, String text)}} to
{{Analyzer}}.
- change {{Analyzer.createComponents}} to take an additional boolean
{{multiTerm}} parameter to know which parts of the analysis chain it should use
when analyzing multi-term queries. For instance, the standard analyzer would
apply a keyword tokenizer rather than a standard tokenizer, and only apply the
standard and lowercase filters (no stop words). CustomAnalyzer would only apply
the factories that implement {{MultiTermAwareComponent}} and pass them through
{{MultiTermAwareComponent.getMultiTermComponent()}}.
- change query parsers to call {{tokenStreamMultiTerm}} rather than
{{tokenStream}} when analyzing text for wildcard, regexp or fuzzy queries.
> Leverage MultiTermAwareComponent in query parsers
> -------------------------------------------------
>
> Key: LUCENE-7355
> URL: https://issues.apache.org/jira/browse/LUCENE-7355
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Adrien Grand
> Priority: Minor
>
> MultiTermAwareComponent is designed to make it possible to do the right thing
> in query parsers when in comes to analysis of multi-term queries. However,
> since query parsers just take an analyzer and since analyzers do not
> propagate the information about what to do for multi-term analysis, query
> parsers cannot do the right thing out of the box.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]