You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Pramod Goyal <pr...@gmail.com> on 2010/07/26 17:49:33 UTC

Updating fields in Solr

Hi,
     I have a requirement where i need to keep updating certain fields in
the schema. My requirement is to change some of the fields or add some
values to a field ( multi-value field ).  I understand that i can use Solr
update for this. If i am using Solr update do i need to publish the entire
document again or do i just need to publish the updated fields. Again in
case of update can i add( append ) news values to the existing fields ?

    In my document most of the parts remains unchanged however few fields
keeps changing. Will it be costly to update the entire document just to
change a field ? I was wondering if i should create to solr core one for
static content and another one for dynamic content. This way i can reduce
the time taken to update a document, but it introduces the complexity of
querying different core and combining the result on the client side.

     Is there a way to configure solr so that client can execute a single
query and solr internally executes multiple queries across different cores
and return single result ?

Re: Updating fields in Solr

Posted by Erick Erickson <er...@gmail.com>.
See below:

On Mon, Jul 26, 2010 at 11:49 AM, Pramod Goyal <pr...@gmail.com>wrote:

> Hi,
>     I have a requirement where i need to keep updating certain fields in
> the schema. My requirement is to change some of the fields or add some
> values to a field ( multi-value field ).  I understand that i can use Solr
> update for this. If i am using Solr update do i need to publish the entire
> document again or do i just need to publish the updated fields. Again in
> case of update can i add( append ) news values to the existing fields ?
>

updating a document does, indeed, require that you reindex the whole thing.
There's no capability to just update a field.


>
>    In my document most of the parts remains unchanged however few fields
> keeps changing. Will it be costly to update the entire document just to
> change a field ? I was wondering if i should create to solr core one for
> static content and another one for dynamic content. This way i can reduce
> the time taken to update a document, but it introduces the complexity of
> querying different core and combining the result on the client side.
>

Do you care how costly it is? By that I mean what is your expected update
rate, how big is your index, etc. If you're updating 1 document a day you
don't
care. If you're updating 100/sec, you care very much. In between it's an
interesting
question :).

Multiple cores are a possibility, but you're right that's more complex. I'd
really
evaluate (by gathering statistics) whether you need to before trying it.


>
>     Is there a way to configure solr so that client can execute a single
> query and solr internally executes multiple queries across different cores
> and return single result ?
>

I'll leave this one to someone else...

Best
Erick