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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

lorenzo zhak
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
Reply | Threaded
Open this post in threaded view
|

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

hossman

: 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

Reply | Threaded
Open this post in threaded view
|

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

lorenzo zhak
Ok, thanks for replying

Laurent