lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrien Grand (JIRA)" <>
Subject [jira] [Commented] (LUCENE-8022) Regression from 6.x version on search with wildcard
Date Tue, 31 Oct 2017 08:27:00 GMT


Adrien Grand commented on LUCENE-8022:

This is due to the fact that we replaced the lowerCaseExpandedTerms option with the Analyzer#normalize
API. So your analyzer should look something like that:

    return new Analyzer() {
      protected TokenStreamComponents createComponents(String fieldName) {
        Tokenizer tokenizer = new WhitespaceTokenizer();
        TokenStream filter = new LowerCaseFilter(tokenizer);
        return new TokenStreamComponents(tokenizer, filter);
      protected TokenStream normalize(String fieldName, TokenStream in) {
        in = new LowerCaseFilter(in);
        return in;

In general I would recommend using CustomAnalyzer instead of manually building analyzers,
it will do the right thing automatically based on the MultiTermAware interface.

    Analyzer analyzer = CustomAnalyzer.builder()

> Regression from 6.x version on search with wildcard
> ---------------------------------------------------
>                 Key: LUCENE-8022
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Florent BENOIT
> Hello,
> let say I index documents with attribute name like: prefixFileName
> and that I search with "prefixF*", it is not found.
> while searching with "prefix*" it works.
> In 6.x (and 5.x) "prefixF*" was finding the value.
> I've provided a test case
> and a pom.xml file
> when setting property version in pom.xml to 6.6.2 it works

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message