Boost token when storing document?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Boost token when storing document?

project2501
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Boost token when storing document?

Daniel Naber-10
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: [hidden email]
For additional commands, e-mail: [hidden email]