Opened 14 years ago
Closed 14 years ago
#339 closed defect (fixed)
Wildcard search broken
Reported by: | heikki | Owned by: | heikki |
---|---|---|---|
Priority: | blocker | Milestone: | v2.6.1 |
Component: | General | Version: | v2.6.0 |
Keywords: | Cc: |
Description
In GN 2.6.0, search queries are subjected to the same Lucene analyzers as the Lucene fields were at index time. This is as such a correct way to deal with Lucene.
However because the standard analyzer used by GeoNetwork, Lucene StandardAnalyzer, tokenizes in such a way that * is considered a delimiter, search queries containing * end up with the * being removed (replaced by whitespace) before the search is executed. That breaks wildcard search.
A solution is to use a custom analyzer, GeoNetworkAnalyzer. It uses WhitespaceTokenizer, LowercaseFilter and ASCIIFoldingFilter, and it is used instead of StandardAnalyzer.
Fixed it and committed fix to trunk and 2.6.x.