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 manuel aldana <al...@gmx.de> on 2009/07/12 16:55:54 UTC

dropping index at startup

is it possible to clean up solr index by passing a start param? 
currently I am deleting the data/ folder to achieve this, which feels a 
bit unnatural. It would be cool to have something like -Dsolr.drop.index 
as parameter.

btw, how does solr generally handle documents in index which aren't 
matching the schema.xml (e.g. after a change done to schema.xml)? Is it 
discarding them, the server itself starts up OK (doesn't give an error, 
that inconsistent documents exist).


-- 
 manuel aldana
 aldana@gmx.de
 software-engineering blog: http://www.aldana-online.de


Re: dropping index at startup

Posted by Mark Miller <ma...@gmail.com>.
On Sun, Jul 12, 2009 at 10:55 AM, manuel aldana <al...@gmx.de> wrote:

> is it possible to clean up solr index by passing a start param? currently I
> am deleting the data/ folder to achieve this, which feels a bit unnatural.
> It would be cool to have something like -Dsolr.drop.index as parameter.


A great and very fast way to clear the index is to do a delete by query with
*:*


>
>
> btw, how does solr generally handle documents in index which aren't
> matching the schema.xml (e.g. after a change done to schema.xml)? Is it
> discarding them, the server itself starts up OK (doesn't give an error, that
> inconsistent documents exist).


The documents already in the index will be the way they were, and new ones
will be the new way - eg your index will be inconsistent. You might have
half your index stemmed and the other half not. It will still work, but you
won't match the documents you want, depending - a query of ski will not
match skiing in the unstemmed half of you documents, but will match the
stemmed docs. You have to reindex to get things consistent again.


>
>
>
> --
> manuel aldana
> aldana@gmx.de
> software-engineering blog: http://www.aldana-online.de
>
>


-- 
-- 
- Mark

http://www.lucidimagination.com