java lucene 搜索_Lucene的查询语法!(搜索引擎)

Lucene provides the relevance level of matching documents based on the terms found. To boost a term use the caret, "^", symbol with a boost factor (a number) at the end of the term you are searching. The higher the boost factor, the more relevant the term will be.

Lucene可以设置在搜索时匹配项的相似度。在项的最后加上符号"^"紧接一个数字(增量值),表示搜索时的相似度。增量值越高,搜索到的项相关度越好。

Boosting allows you to control the relevance of a document by boosting its term. For example, if you are searching forjakartaapache and you want the term "jakarta" to be more relevant boost it using the ^ symbol along with the boost factor next to the term. You would type:

通过增量一个项可以控制搜索文档时的相关度。例如如果您要搜索jakarta apache,同时您想让"jakarta"的相关度更加好,那么在其后加上"^"符号和增量值,也就是您输入:

jakarta^4 apache

This will make documents with the termjakartaappear more relevant. You can also boost Phrase Terms as in the example:

这将使得生成的doucment尽可能与jakarta相关度高。您也可以增量短语,象以下这个例子一样:

"jakartaapache"^4 "jakartalucene"

By default, the boost factor is 1. Although, the boost factor must be positive, it can be less than 1 (i.e. .2)

默认情况下,增量值是1。增量值也可以小于1(例如0.2),但必须是有效的。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值