We are using solr for offering search for our website.  We want to add an
anchor text field value (from incoming links to a webpage), a link
popularity score field value, and other similar field values, that are
computed separately from the programs page owners use to index their
documents to Solr.

However, the problem is when we add these values, they are later lost when
one of the many other indexing programs is run to add new documents or
modifications because the entire document is cleared when the new documents
are added.  Since documents may be re-indexed or new documents added at any
time, trying to synchronize populating these values with content indexing is
not an option.  We also want to avoid forcing all the indexers to change how
they index.  We are using Solr 3.6.

What we would like is to have Solr keep any field values if they are not
specified in a document to add, if that document was already existing in the
index.  Since these other indexing programs do not touch these fields at
all, we'd like to keep (copy over) the stored values for these unspecified
fields when a document with the same key is indexed.  

E.g., say a document has "popularity", "body", and "title" field and someone
issues a delete command to solr to delete the document then adds a document
with the same id but only "body" and "title" we want to have the previous
"popularity" value copied over.


Would this be possible using a custom UpdateRequestProcessor, or is there
any easier/better way to accomplish this?  Or is there perhaps already such
a processor written?

What I am thinking is having the UpdateRequestProcessor query solr for the
id of the document to add for any fields not specified in the add request,
then adding those values to the input document.  Since deleting does not
actual change the indexing until a commit is made it should be possible to
get the old values, right?





--
View this message in context: 
http://lucene.472066.n3.nabble.com/Keep-existing-field-values-that-are-not-specified-for-re-added-documents-tp4081993.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to