You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Darren Govoni <da...@ontrenet.com> on 2008/07/13 16:39:17 UTC

Boost token when storing document?

Hi,
  Sorry if I missed this in the documentation, but I wanted to know if
Lucene allows boosting of tokens _within_ a field when a document is
stored? Let me explain. Let's say I store the following field

numbers: one one one two three

Searching "numbers:" field with a boost on one will score higher for
this document because "one" is stronger in the field. What I want is to
not have to store "one" 3 times in the field.

numbers: one^3 two three

Or something like that _when_ I store the document. So when a search
comes, it sees that document as IF "one" was present 3 times. This way I
can manipulate the presence of tokens in a document without having to
waste space for them?

Thank you for any thought on this.

Darren


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


Re: Boost token when storing document?

Posted by Daniel Naber <lu...@danielnaber.de>.
On Sonntag, 13. Juli 2008, Darren Govoni wrote:

> Hi,
>   Sorry if I missed this in the documentation, but I wanted to know if
> Lucene allows boosting of tokens _within_ a field when a document is
> stored? 

Yes, you can use payloads for that, see 
http://wiki.apache.org/lucene-java/Payloads

Regards
 Daniel

-- 
http://www.danielnaber.de

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