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 Dennis Gearon <ge...@sbcglobal.net> on 2011/01/13 08:06:05 UTC

basic document crud in an index

OK, getting ready to be more intereactive with my index, (she likes me).
These are pretty much boolean answered questions to help my understanding.
I think having these in the mail list records might help other too.

A/ Is there a query that updates all the fields automatically on a record that 
has a unique id?
   
B/ Does it leave the old document and new document in the index?

C/ Will a query immedialty following see both documents?

D/ Merging does not get rid of any old documents if there are any, but optimize 
does?

E/ Is optimize invoked on the whole index, not individual segments?


 

Thanks for a great product, ya'll. 

I have a 64K document index, small by many standards. But I did a search on it 
for a test, and started at row 16,000 of the results (broad results), and almost 
not noticeably slower than starting at 0. And it's on the lowest cost Amazon 
server that will run it. Of course, no one but me is hitting that box yet :-)

Dennis Gearon


Signature Warning
----------------
It is always a good idea to learn from your own mistakes. It is usually a better 
idea to learn from others’ mistakes, so you do not have to make them yourself. 
from 'http://blogs.techrepublic.com.com/security/?p=4501&tag=nl.e036'


EARTH has a Right To Life,
otherwise we all die.


Re: basic document crud in an index

Posted by Markus Jelsma <ma...@openindex.io>.
To fill the gaps:

b. the old version remains on disk but is flagged for deletion
d. optimize equals merging, the difference is how many segments come out
e. yes

On Thursday 13 January 2011 15:21:54 kenf_nc wrote:
> A/ You have to update all the fields, if you leave one off, it won't be in
> the document anymore. I have my 'persisted' data stored outside of Solr, so
> on update I get the stored data, modify it and update Solr with every field
> (even if one changed). You could also do a Query/Modify/Update directly in
> Solr, just remember to send all fields in the update. There isn't (in 1.4
> anyway) a way to update specific fields only.
> 
> B/ When you update, it is my understanding that, yes, the old doc is there
> deleted and a new doc is in place. You can't get to the old one however and
> it will go away at the next Optimize. I've never used it, but when you
> Commit you can send an optional parameter 'expungeDeletes' that should
> remove deleted docs as well.
> 
> C/ Not that I'm aware of
> 
> D/ <don't know>
> 
> E/ That is my understanding, but I'm admittedly a little weak on that part.
> I just have a job that runs in the middle of the night and runs Optimize
> once each night, I don't dig deeper than that into what goes on.

-- 
Markus Jelsma - CTO - Openindex
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350

Re: basic document crud in an index

Posted by kenf_nc <ke...@realestate.com>.
A/ You have to update all the fields, if you leave one off, it won't be in
the document anymore. I have my 'persisted' data stored outside of Solr, so
on update I get the stored data, modify it and update Solr with every field
(even if one changed). You could also do a Query/Modify/Update directly in
Solr, just remember to send all fields in the update. There isn't (in 1.4
anyway) a way to update specific fields only.

B/ When you update, it is my understanding that, yes, the old doc is there
deleted and a new doc is in place. You can't get to the old one however and
it will go away at the next Optimize. I've never used it, but when you
Commit you can send an optional parameter 'expungeDeletes' that should
remove deleted docs as well.

C/ Not that I'm aware of

D/ <don't know>

E/ That is my understanding, but I'm admittedly a little weak on that part.
I just have a job that runs in the middle of the night and runs Optimize
once each night, I don't dig deeper than that into what goes on.
-- 
View this message in context: http://lucene.472066.n3.nabble.com/basic-document-crud-in-an-index-tp2246793p2248422.html
Sent from the Solr - User mailing list archive at Nabble.com.