lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernd Fehling <>
Subject not indexing analyzed field
Date Thu, 25 Nov 2010 13:08:18 GMT
I used KeywordAnalyzer and KeywordTokenizer as templates for
a new analyzer.
The analyzer works fine but the result never reaches the index.

My analyzer is called in "DocInverterPerField.processFields"
with "stream.incrementToken()".
try {
    boolean hasMoreTokens = stream.incrementToken();

    fieldState.attributeSource = stream;

    OffsetAttribute offsetAttribute = fieldState.attributeSource.addAttribute(OffsetAttribute.class);
    PositionIncrementAttribute posIncrAttribute = fieldState.attributeSource.addAttribute(PositionIncrementAttribute.class);


The result goes to "fieldState.attributeSource" but is not in "field".
So "field.fieldsData" still has the old content before calling my
analyzer. And when calling "consumer.start(field)" the old content
is going to the index and not the new analyzed one.
Does the analyzer has to care about "Fieldable field.fieldsData"
or who is responsible for it?


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

View raw message