On 1/11/07, Erik Hatcher <[EMAIL PROTECTED]> wrote:

On Jan 11, 2007, at 1:29 AM, Ryan McKinley wrote:
> mode="add or replace fields"
> mode="add fields"
> mode="add distinct fields"
>
> The reason i ask is that i would like to frequently update a few
> fields without having to know anything about the other fields.

If you can implement a way to do this efficiently with Lucene, you
will be my (and many others) hero!


I'm still new to this, so *please* don't mistake my ambition for hubris!

I understand lucene needs to add all document fields at the same time.
I don't have any magic idea to change that.  BUT it seems like solr
is a good place to offer a syntax that lets users ignore feel like
they are just updating a field rather then loading all fields and
reindexing.

In Lucene to update a document the operation is really a delete
followed by an add.  You will need to add the complete document as
there is no such "update only a field" semantics in Lucene.

If all fields are stored, the implementation could simply pull them
all into memory on the Solr side and add the document as if it had
been sent entirely by the client.  But, what happens when for un-
stored fields?


for the unstored fields, is it possible to read the tokens (and all
info) and then write them back directly?  Does lucene let you do this
directly?  or do would i need to write a Tokenizer that takes the old
list of tokens and re-tokenizes them?

I guess this would require a slightly different DocumentBuilder for
'updated' fields where you would skip the analyzers defined by the
schemaField.

Reply via email to