Lucene Prefix Search for Indexed data through Standard Analyzer

北战南征 提交于 2019-12-11 08:08:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!