: I can certainly do: search for the unique key or combination of other 
: fields, then put rest fields of this document plus new fields back to 
: it.
: 
: I know this is not a too smart way, before I do that, is there any solr 
: guru out there who can think of a better way?

That is really, the only way, to "update" an existing document using solr 
"out of the box"

(you can for the record, add new fields to your schema at anytime, but 
there is no way to add values for a field to an existing document)

If you know Java and you're willing to get really familiar with the low 
levle lucene internals, you can write yourself a custom app to "merge" 
your existing index into a new (empty) index while using a 
"ParallelReader" that would let you associate new fields with each doc.  
Writing a utility like this is a *seriously* exercise and has a lot of 
little nuances you would need to worry about to get it to work right. 

I personally have never attempted it ... even when i'ven needed to add new 
fields to my biggest indexes, I've always decided that the wall clock 
and CPU time needed to rebuild my index from scratch while i do 
something else was cheaper then my developer time of jumping through the 
hoops to get this to work. (particularly since there's still a non-trivial 
amount of cpu and wall clock time needed to run the thing once you write 
it)


-Hoss

Reply via email to