2
votes

I am using SolrNet to intreract with a Solr index. I have a daemon application writing to the Solr index with adds/updates/deletes. However with SolrNet an Add with the same unique-key over-writes (replaces) the existing document, instead of appending (combining) them.

In Lucene I could do something like this where term is the Lucene term for the document key. How can I do this in SolrNet? I know of the (painful) way of appending field-by-field in a method, but surely there has to be a simpler way...

//where term is a Lucene term for the document key
if (objFacetsSearcher.DocFreq(term) > 0)
{
    objWriter.UpdateDocument(term, doc);
    updated++;
}
else
{
    objWriter.AddDocument(doc);
    added++;
}
1
@Mauricio - don't think that is related to my question.Mikos
it's exactly the same. In Solr you can't update individual fields.Mauricio Scheffer

1 Answers

1
votes

As far as I know, this isn't supported in Solr yet. See SOLR-139.