在Hibernate搜索/Lucene中转义正斜杠字符

在Hibernate搜索/Lucene中转义正斜杠字符,hibernate,lucene,hibernate-search,Hibernate,Lucene,Hibernate Search,我正在使用HibernateSearch4.2和Lucene3.6 我在域中有以下列: @Column(name = "summarycontent") @Field(index = Index.YES, store = Store.YES) public String getSummarycontent() { return this.summarycontent; } 在数据库中我有数据:abcdef dsfasdf 14/12 fdfdf 执行查询时,query:+summary

我正在使用HibernateSearch4.2和Lucene3.6

我在域中有以下列:

@Column(name = "summarycontent")
@Field(index = Index.YES, store = Store.YES)
public String getSummarycontent() {
    return this.summarycontent;
}
在数据库中我有数据:
abcdef dsfasdf 14/12 fdfdf

执行查询时,
query:+summarycontent:14/12~0.3
不返回结果

我想这是因为Lucene在单词“14/12”中没有逃过正斜杠字符


请帮助我在Hibernate中使用forward flash字符处理Lucene搜索。

您需要查看Lucene中可用的不同标记器,因为我认为经典标记器和标准标记器在标记化过程中都会丢弃“/”。

您需要查看Lucene中可用的不同标记器,因为我认为经典和标准标记器在标记化过程中都会丢弃“/”