问题
I am creating index using Lucene 3.6.0 for Java. They are built using Standard Analyzer. Is there any way I can perform prefix search with lucene i.e. i want the results to start with the specified search string without changing the analyzer used for indexing?
Many thanks
回答1:
If you mean queries like "work*" to find "work", "worker", "working", etc. you can already perform those queries using text analyzed with the Standard Analyzer.
documented here: http://lucene.apache.org/core/3_6_0/queryparsersyntax.html#Wildcard%20Searches
来源:https://stackoverflow.com/questions/10671755/lucene-prefix-search-for-indexed-data-through-standard-analyzer