[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: how to update specific document (record) of solr
From:       Erick Erickson <erickerickson () gmail ! com>
Date:       2011-10-31 18:55:24
Message-ID: CAN4YXveK=U0UcZVCqBLJCi8+kThYc7Qdv3ObiTkQ=eSd6RkGWw () mail ! gmail ! com
[Download RAW message or body]

The problem is the write-once nature of the segment files. Once a "commit"
occurs, the rule is that segments never are changed. Since the stored
data is held in a segment, this just follows from the rule.

Fine, she says, why can't you change the rule? I guess you could, but
this assumption is built into a LOT of code. All the replication for
starters. per-segment readers. And who knows what else. The problem
for indexed data is worse, much worse. Just updating the stored
data wouldn't be nearly as valuable as updating the indexed data,
so I suspect (but don't know) that it won't be broken out.

But consider just the update of stored data case. The storage is
packed, they're not just a bunch of separate strings. So to update
a single field, especially if the data was longer than the original, you'd
have to re-write the entire segments file (assuming the rule I referred
to above were changed). Now, to update a byte of data you potentially
have to copy gigabytes of data. And then replicate that entire thing
to all the slaves. And all the other issues.

Of course you can create schemes that avoid this problem, but pretty soon
you get to diminishing returns for stored-data-only, and we haven't even
started worrying about the indexed variety.....

Not a stupid question at all, and it sure would be nice if it could be
made to happen, but not any time soon I don't think.... But if anyone has
a brilliant solution to the problem, people would love to hear it <G>!

Best
Erick

On Mon, Oct 31, 2011 at 2:42 PM, Andrea Gazzarini <agazzarini@apache.org> wrote:
> Probably a stupid question...why is not possible to update "stored and
> not indexed" fields?
> 
> Andrea
> 
> On 10/31/11, Erick Erickson <erickerickson@gmail.com> wrote:
> > No, you can't update individual fields. And you probably won't be able
> > to unless Solr (well, Lucene actually) undergoes some *major*
> > re-architecture.
> > 
> > Best
> > Erick
> > 
> > On Mon, Oct 31, 2011 at 11:19 AM, viruslviv <viruslviv@gmail.com> wrote:
> > > As far as I know you can't update specific fields only. You should read
> > > your
> > > document, change some field and put the whole to the index back
> > > 
> > > --
> > > View this message in context:
> > > http://lucene.472066.n3.nabble.com/how-to-update-specific-document-record-of-solr-tp3467929p3468077.html
> > >  Sent from the Solr - User mailing list archive at Nabble.com.
> > > 
> > 
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic