lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nadav Har'El" <...@math.technion.ac.il>
Subject Re: Payloads
Date Wed, 03 Jan 2007 13:46:13 GMT
On Wed, Dec 20, 2006, Michael Busch wrote about "Payloads":
>..
> Some weeks ago I started working on an improved design which I would 
> like to propose now. The new design simplifies the API extensions (the 
> Field API remains unchanged) and uses less disk space in most use cases. 
> Now there are only two classes that get new methods:
> - Token.setPayload()
>  Use this method to add arbitrary metadata to a Token in the form of a 
> byte[] array.
>...

Hi Michael,

For some uses (e.g., faceted search), one wants to add a payload to each
document, not per position for some text field. In the faceted search example,
we could use payloads to encode the list of facets that each document
belongs to. For this, with the old API, you could have added a fixed term
to an untokenized field, add add a payload to that entire untokenized field.

With the new API, it seems doing this is much more difficult and requires
writing some sort of new Analyzer - one that will do the regular analysis
that I want for the regulr fields, and add the payload to the one specific
field that lists the facets.
Am I understanding correctly? Or am I missing a better way to do this?

Thanks,
Nadav.

-- 
Nadav Har'El                        |    Wednesday, Jan  3 2007, 13 Tevet 5767
IBM Haifa Research Lab              |-----------------------------------------
                                    |If you lost your left arm, your right arm
http://nadav.harel.org.il           |would be left.

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


Mime
View raw message