lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <>
Subject Payloads and tokenizers
Date Thu, 14 Aug 2008 03:14:00 GMT
I started playing with payloads and have been trying to work out how to get the 
data into the payload

I have a field where I want to add the following untokenized fields


With these fields, I would like to add the payloads


Firstly, it looks like you cannot add payloads to untokenized fields.  Is this 
correct?  In my usage, A and B are simply external Ids so must not be tokenized 
and there is always a 1-->1 relationship between them.

Secondly, what is the way to provide the payload data to the tokenizer.  It 
looks like I have to add a List/Map of payload data to a custom Tokenizer and 
Analyzer, which is then consumed each "next(Token)".  However, it would be nice 
if, in my use case, I could use some kind of construct like:

Document doc = new Document()
Field f = new Field("myField", "A1", Field.Store.NO, Field.Index.UNTOKENIZED);

and avoid the whole unnecessary Tokenizer/Analyzer overhead and give support for 
payloads in untokenized fields.

It looks like it would be trivial to implement in DocumentsWriter.invertField(). 
  Or would this corrupt the Fieldable interface in an undesirable way?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message