Question

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++;
}
Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top