On Feb 16, 2008, at 5:47 AM, Timothy Garafola wrote:
I recently released a simple perl wrapper module to CPAN which supplies
methods in perl for posting adds, deletes, commits, and optimizes to a
solr server.

Nice!

One of the things I have a need for is the ability to update by query;
something similar in functionality to SOLRs delete_by_query.  Is there
anything like this already in SOLR?

No, not really, except the modifiable document patch (which is probably out of sync with trunk at this point). SOLR-139 (? not online at the moment to look it up)

    I'm playing with doing this in
perl by first issuing a query, parsing the returned xml into  a perl
data structure, updating element values and/or extending it with dynamic
fields in the data structure, then reposting the docs returned in the
initial query.  Can anyone tell me if I'm reinventing a wheel here or
suggest an alternative approach?

The issue with modifying documents in Solr becomes tricky/impossible if you allow unstored fields. For your approach to work, all fields need to be stored, and in large index scenarios it could be prohibitive to store all field data, and thus the client might need to be involved in re-adding field data that is irretrievable from Solr. Just food for thought. In many cases, though, storing all field data is fine and your approach, or the modifiable document patch, is reasonable.

        Erik

Reply via email to