lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Bethard <beth...@stanford.edu>
Subject Re: exponential boosts
Date Fri, 24 Apr 2009 17:12:50 GMT
On 4/24/2009 3:16 AM, Doron Cohen wrote:
> On Fri, Apr 24, 2009 at 12:28 AM, Steven Bethard <bethard@stanford.edu>wrote:
> 
>> On 4/23/2009 2:08 PM, Marcus Herou wrote:
>>> But perhaps one could use a FieldCache somehow ?
>> Some code snippets that may help. I add the PageRank value as a field of
>> the documents I index with Lucene like this:
>>
>>    Document document = new Document();
>>    double pageRank = this.pageRanks.getCount(article.getId());
>>    document.add(new Field(
>>        PAGE_RANK_FIELD_NAME, Float.toString((float)pageRank),
>>        Field.Store.YES, Field.Index.NOT_ANALYZED));
> 
> 
> Note that there's no need to store this field - it is the indexed
> value which is  being used.

Thanks, that's good to know. I debated this for a while, but couldn't
tell for certain from the documentation.

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message