[
https://issues.apache.org/jira/browse/LUCENENET-51?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519258
]
Digy commented on LUCENENET-51:
-------------------------------
Hi George,
This is not a porting problem and the bug is inherited from the java
version.
If a custom analyzer is used for both indexing and searching, then
Lucene works well [if wildcards("*") are not used]. With a query using
wildcards "GetPrefixQuery" is invoked and the problem starts at that point
since "GetPrefixQuery" method does not mimic the behaviour of the analyzer and
just calls the function "ToLower" (for ex, the analyzer may have its own
"ToLower" function which does some magic things).
DIGY
> QueryParser.GetPrefixQuery does not use the analyzer
> ----------------------------------------------------
>
> Key: LUCENENET-51
> URL: https://issues.apache.org/jira/browse/LUCENENET-51
> Project: Lucene.Net
> Issue Type: Bug
> Reporter: Digy
> Priority: Minor
> Attachments: BugSample.cs, QueryParser.patch
>
>
> Hi all,
> Some custom analyzers use their own LowerCase filters and Stem filters.
> For ex. ÖöÜü is converted by lowercase the filter to oouu(only latin charset)
> and this token is stored in the index.
> But QueryParsers's GetPrefixQuery method does not use the analyzer's
> lowercase filter. So it convert the token to
> lowercase(which is ööüü) and a search like ÖöÜü* returns no result since
> Lucene searches tokens starting with ööüü
> (not with oouu) in the index.
> The same is also valid for stem filters. Assume that a pseudo language's stem
> filter converts the trailing "abcd" to e.
> Then a search like 1234abcd* will return no result even if a token 1234e is
> stored in the index.
> Therefore QueryParsers.GetPrefixQuery method has to be fixed to force to use
> the analyzer.
> GetWildcardQuery, GetFuzzyQuery may also suffer from the same problem.
> I will attach a sample code to show the bug and a patch for GetPrefixQuery
> DIGY.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.