lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Sokolov <>
Subject storing pre-analyzed fields
Date Wed, 11 Jul 2012 00:54:14 GMT
I have a question about the API for storing and indexing lucene 
documents (in 3.x).

If I want to index a document by providing a TokenStream, I can do that 
by calling document.add (field) where field is something I write 
deriving from AbstractField that returns the TokenStream for 
tokenStreamValue(), and nothing for stringValue() or readerValue().

Now if I also want to store a value for that field, do I just add a 
different field with different options (eg stored=true, and the field a 
normal Field)?

Do these two things conflict in any way?  Do I have to be careful about 
the order in which I do them?  Or is it just a mildly weird API with no 
lurking ill effects? :)

Also: I have been seeing various e-mails about changes to this API so I 
assume it's all different in 4.0; if you want to take this opportunity 
to explain that, please go ahead, but for now I am working with the 3.x API.


-Mike Sokolov

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

View raw message