不能使用lucene索引的特殊字符 [英] Special Characters that can't be indexed using lucene

查看:102
本文介绍了不能使用lucene索引的特殊字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以使用Apache Lucene索引的特殊字符列表.有人可以告诉我是否有使用Apache Lucene库无法索引的特殊字符吗?

I know the list of special characters that can be indexed using Apache Lucene. Can some one tell me if there are any special characters that cannot be indexed using Apache Lucene library?

推荐答案

来自: https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Escaping%20Special%20Characters

Lucene支持转义查询语法中包含的特殊字符.当前列表的特殊字符是 +-&& || ! (){} [] ^〜*?:\

Lucene supports escaping special characters that are part of the query syntax. The current list special characters are + - && || ! ( ) { } [ ] ^ " ~ * ? : \

因此,基本上,您似乎可以对任何内容建立索引,只需对其进行转义即可.

So basically it looks like you can index anything, just have to escape it.

这篇关于不能使用lucene索引的特殊字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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