lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fredrik Andersson <>
Subject Re: Reading back binary fields
Date Thu, 29 Sep 2005 08:40:28 GMT
Problem solved, it was a problem located elsewhere in the code not related
to Lucene. Sorry!


On 9/29/05, Fredrik Andersson <> wrote:
> Hey Gang!
> I'm having some problems when modifying an existing index, adding a binary
> field to each document. Or more specifically, I have a problem reading back
> that field. I'm using the IndexModifier from the trunk, and I am positive
> that the binary field gets written down, since the field name shows up in in
> Luke.
> The index modification is nothing out of the ordinary.
> -----------------
> int i = some integer
> Document doc = indexReader.document(i);
> indexModifier.delete(i);
> Field tvField = new Field(TV_FIELD_NAME,aByteArray,Field.Store.YES);
> doc.add(tvField);
> indexModifer.addDocument(doc);
> indexModifier.optimize();
> indexModifier.close();
> -----------------
> However, when I re-read that document at a later point in time, and
> iterate the doc.fields() enumeration, the TV_FIELD_NAME field does not
> show up. Luke shows that field, though - what's the trick?
> On a side-note, I have modified the IndexModifier to use write/delete
> buffers, so that when some defined buffer size overflows, the buffers
> flushes down their stuff to the internal indexReader and indexWriter in
> delete-write order. It increased the speed tremendously compared to the old
> IndexModifier, which doesn't use any form of internal buffering. If this is
> something you want comitted to the Lucene trunk, give me a shout and I'll
> clean it up.
> Thanks,
> Fredrik

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message