Lucene前缀通过标准分析器搜索索引数据 [英] Lucene Prefix Search for Indexed data through Standard Analyzer

查看:170
本文介绍了Lucene前缀通过标准分析器搜索索引数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Lucene 3.6.0 for Java创建索引.它们是使用标准分析器构建的.我有什么方法可以使用lucene执行前缀搜索,即我希望结果以指定的搜索字符串开头而不更改用于索引的分析器?

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?

非常感谢

推荐答案

如果您要查询诸如工作*"之类的查询来查找工作",工人",工作"等,则可以使用文本执行这些查询用标准分析仪进行分析.

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.

在此处记录: http://lucene.apache.org/core /3_6_0/queryparsersyntax.html#Wildcard%20Searches

这篇关于Lucene前缀通过标准分析器搜索索引数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆