On 10-Oct-07, at 1:11 PM, Charlie Jackson wrote:
Anyway, I need to update some docs in my index because my client
program
wasn't accurately putting these docs in (values for one of the fields
was missing). I'm hoping I won't have to write additional code to go
through and delete each existing doc before I add the new one, and I
think setting allowDups on the add command to false will allow me
to do
this. I seem to recall something in the update handler code that goes
through and deletes all but the last copy of the doc if allowDups is
false - does that sound accurate?
Yes. But you need to define a uniqueKey in schema and make sure it
is the same for docs you want overwritten. This is how solr detects
"dups".
If so, I just need to make sure that solrj properly sets that flag,
which leads me to my next question. Does solrj default allowDups to
false? If not, what do I need to do to make sure allowDups is set to
false when I'm adding these docs?
It is the normal mode of operation for Solr, so I'd be surprised if
it wasn't the default in solrj (but I don't actually know).
-Mike