People are working on "field update", but that feature is not currently available in a release of Solr.

You can read about the current status of that work here:
https://issues.apache.org/jira/browse/SOLR-139

It may or may not be usable for you today - in trunk.

But if field update is important to you and you don't want to use that patch, you could implement a custom update processor that performed the read/increment/write sequence as you need it. That would require all of you fields to be stored, which is probably what you have if you are doing the update remotely. Take a look at SOLR-139 first.

-- Jack Krupansky

-----Original Message----- From: Mark Laurent
Sent: Saturday, May 12, 2012 1:00 PM
To: solr-user@lucene.apache.org
Subject: Indexing to add to a field, not replace

Hello,

Is it possible to perform an index commit that Solr would add the incoming
value to an existing fields' value?

I have for example:

   <fields>
       <field name="book_title" type="string" index="true" stored="true"
required="true" />
       <field name="count" type="int" index="true" stored="true"
required="true" />
   </fields>

Currently, I am doing a search to retrieve the current value of "count",
then doing the addition on my processing server then committing the new
"count" value. Is it possible to use a copyField or a custom field type
that would perform this addition for me so I can skip the search query?

Thanks in advance for your time!
- Mark

Reply via email to