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 lorenzo zhak <zh...@gmail.com> on 2007/09/06 16:51:55 UTC

Deleting all index, including synonyms.txt and stopwords.txt

Hi,

I'm actually facing a issues reguarding a process on our Solr Webapp

We currently reindexe all document every X days since our stopwords
and synonyms list are very often edited and since we use
stopwordFilter and SynFilter at index time.

For that process, I wrote a Ant script that do something like :

1) - Stop Solr webapp with Tomcat Manager "Stop" task
2) - Delete "synonym.txt" file
3) - Delete "stopwords.txt" file
4) - Delete "index" folder
5) - Start Solr webapp with Tomcat Manager "Start" task
6) - Repost all document with post.jar

Everything seems to work fine, but sometime it seems that the webapp
Stop doesn't properly stop the webapp since the files remains locked
(but the webapp is
actually stopped) and so the delete could not be done.

I found on the net an attribute on the <context> tag on Tomcat 5.5
configuration files, "antiResourceLocking", that seems to work fine,
but the lock remains sometimes...

So I looked into the sorl mailing list, and found a thread that show
how to totally reset the index file using the XmlPost

<delete><query>*:*</query></delete>

followed by

<optimize waitFlush="false" waitSearcher="false"/>

This solve my index problem, but still remains the issue concerning
the synonyms and stopwords list

Is their a way, like '<delete><query>*:*</query></delete>', to reinit
the synonyms and stopword list without stopping the solr webapp ?

Thanks in advance !

Laurent

Re: Deleting all index, including synonyms.txt and stopwords.txt

Posted by Laurent Gilles <zh...@gmail.com>.
Ok, thanks for replying

Laurent

Re: Deleting all index, including synonyms.txt and stopwords.txt

Posted by Chris Hostetter <ho...@fucit.org>.
: Everything seems to work fine, but sometime it seems that the webapp
: Stop doesn't properly stop the webapp since the files remains locked
: (but the webapp is
: actually stopped) and so the delete could not be done.

it may take some time for the Solr webapp to completely shut itself down 
when you send the "Stop" command to tomcat ... it depends on wether there 
are any updates pending, or if it's in hte middle of a large commit -- or 
even if it's in the middle of processing some intensive query requests.

: Is their a way, like '<delete><query>*:*</query></delete>', to reinit
: the synonyms and stopword list without stopping the solr webapp ?

nope. those files are only read when the factories are instantiated by the 
schema .. and the schema is only read on application startup.




-Hoss