lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ZHANG Liang F <Liang.f.Zh...@alcatel-sbell.com.cn>
Subject RE: what is precisionStep and positionIncrementGap
Date Thu, 28 Jun 2012 08:15:53 GMT
看了你的blog,写得相当不错啊!
我有一个网站www.ecmkit.com,专注内容管理的。有空多交流! 

-----Original Message-----
From: Li Li [mailto:fancyerii@gmail.com] 
Sent: 2012年6月28日 15:54
To: solr-user@lucene.apache.org
Subject: Re: what is precisionStep and positionIncrementGap

read "How it works" of
http://lucene.apache.org/core/old_versioned_docs/versions/3_5_0/api/all/org/apache/lucene/search/NumericRangeQuery.html
if you can read Chinese, I have a blog explaining the details of the implementation.
http://blog.csdn.net/fancyerii/article/details/7256379

On Thu, Jun 28, 2012 at 3:51 PM, ZHANG Liang F <Liang.f.Zhang@alcatel-sbell.com.cn>
wrote:
> Thanks a lot, but the precisionStep is still very vague to me! Could you give me a example?
>
> -----Original Message-----
> From: Li Li [mailto:fancyerii@gmail.com]
> Sent: 2012年6月28日 11:25
> To: solr-user@lucene.apache.org
> Subject: Re: what is precisionStep and positionIncrementGap
>
> 1. precisionStep is used for ranging query of Numeric Fields. see 
> http://lucene.apache.org/core/old_versioned_docs/versions/3_5_0/api/al
> l/org/apache/lucene/search/NumericRangeQuery.html
> 2. positionIncrementGap is used for phrase query of multi-value fields e.g. doc1 has
two titles.
>   title1: ab cd
>   title2: xy zz
>   if your positionIncrementGap is 0, then the position of the 4 terms are 0,1,2,3.
>   if you search phrase "cd xy", it will hit. But you may think it 
> should not match
>   so you can adjust positionIncrementGap to a larger one. e.g. 100.
>   Then the positions now are 0,1,100,101. the phrase query will not match it.
>
> On Thu, Jun 28, 2012 at 10:00 AM, ZHANG Liang F <Liang.f.Zhang@alcatel-sbell.com.cn>
wrote:
>> Hi,
>> in the schema.xml, usually there will be fieldType definition like
>> this: <fieldType name="int" class="solr.TrieIntField"
>> precisionStep="0" omitNorms="true" positionIncrementGap="0"/>
>>
>> the precisionStep and positionIncrementGap is not very clear to me. Could you please
elaborate more on these 2?
>>
>> Thanks!
>>
>> Liang
Mime
View raw message