Re: Question on deleting all rows for an index
If this is a one-time cleanup, not something you need to do programmatically, you could delete the index directory ( /data/index ). In my case I have to stop Tomcat, delete .\index and restart Tomcat. It is very fast and starts me out with a fresh, empty, index. Noticed you are multi-core, I'm not, so this could be bogus information for you...but thought I'd toss it out just in case. -- View this message in context: http://lucene.472066.n3.nabble.com/Question-on-deleting-all-rows-for-an-index-tp2246726p2248332.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Question on deleting all rows for an index
Use this type of url for delete all data with fallowed by commit http://localhost:8983/solr/update/?stream.body=*:*&commit=true - Grijesh -- View this message in context: http://lucene.472066.n3.nabble.com/Question-on-deleting-all-rows-for-an-index-tp2246726p2246948.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Question on deleting all rows for an index
Hi Robert, You can find an example of something similar to this in the examples that are part of the solr distribution. The tutorial ( http://lucene.apache.org/solr/tutorial.html) describes how to post data to the solr server via the post.jar user:~/solr/example/exampledocs$ *java -jar post.jar solr.xml monitor.xml* If you take a look at the solr.xml file, you will see SOLR1000 Solr, the Enterprise Search Server I think you can post your delete query to the server in the same way. Hope this helps. -Daniel We are just staring with Solr and have a multi core implementation and need to delete all the rows in the index to clean things up. When running an update via a url we are using something like the following which works fine: http://localhost:8983/solr/template/update/csv?commit=true&escape=\&stream.file=/opt/TEMPLATE_DATA.csv Not clear on how to delete all the rows in this index. The documentation gives this example: timestamp:[* TO NOW-12HOUR] I'm not clear on the context of this command - is this through the Solr admin or can you run this via the restful call? Trying to add this to a restful call does not work like this attempt: http://localhost:8983/solr/template/timestamp:[* TO NOW-12HOUR] Any thoughts appreciated. Bob
Re: Question on deleting all rows for an index
On Thu, Jan 13, 2011 at 6:08 AM, Wilson, Robert wrote: > We are just staring with Solr and have a multi core implementation and need > to delete all the rows in the index to clean things up. > > When running an update via a url we are using something like the following > which works fine: > http://localhost:8983/solr/template/update/csv?commit=true&escape=\&stream.file=/opt/TEMPLATE_DATA.csv > > Not clear on how to delete all the rows in this index. The documentation > gives this example: > timestamp:[* TO NOW-12HOUR] [...] Not sure where you got that from. The proper delete query to delete *all* records would be: *:* Please note that you have to follow the delete with a commit. You can use curl to call Solr for both the delete and commit. Please see http://wiki.apache.org/solr/UpdateXmlMessages for details. Regards, Gora
Question on deleting all rows for an index
We are just staring with Solr and have a multi core implementation and need to delete all the rows in the index to clean things up. When running an update via a url we are using something like the following which works fine: http://localhost:8983/solr/template/update/csv?commit=true&escape=\&stream.file=/opt/TEMPLATE_DATA.csv Not clear on how to delete all the rows in this index. The documentation gives this example: timestamp:[* TO NOW-12HOUR] I'm not clear on the context of this command - is this through the Solr admin or can you run this via the restful call? Trying to add this to a restful call does not work like this attempt: http://localhost:8983/solr/template/timestamp:[* TO NOW-12HOUR] Any thoughts appreciated. Bob