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 vanderkerkoff <mj...@glam.ac.uk> on 2007/07/19 11:52:32 UTC
DeleteByQuery python syntax for delte all
Hello everyone
Loving solr, got an idiot question for you.
I have been manually deleting our index in the python interpretor when
testing
from solr import SolrConnection
c = SolrConnection(host='localhost:8983', persistent=False)
allgone = '[ * : * ]'
c.deleteByQuery(query=allgone)
c.commit(optimize-True)
I've forgotten the exact syntax for this line
allgone = '[ * : * ]'
Can't seem to get it right, anyone know what it should be?
Is it '[all:all]' or something?
Any help, greatly appreciated
--
View this message in context: http://www.nabble.com/DeleteByQuery-python-syntax-for-delte-all-tf4109267.html#a11685509
Sent from the Solr - User mailing list archive at Nabble.com.
Re: DeleteByQuery python syntax for delte all
Posted by vanderkerkoff <mj...@glam.ac.uk>.
roopesh, thank you very much
roopesh-2 wrote:
>
> This should work :
> c.deleteByQyery('id:[* TO *]')
> c.commit()
>
> Regards
> Roopesh
>
> vanderkerkoff wrote:
>> Hello everyone
>>
>> Loving solr, got an idiot question for you.
>>
>> I have been manually deleting our index in the python interpretor when
>> testing
>>
>> from solr import SolrConnection
>> c = SolrConnection(host='localhost:8983', persistent=False)
>> allgone = '[ * : * ]'
>> c.deleteByQuery(query=allgone)
>> c.commit(optimize-True)
>>
>> I've forgotten the exact syntax for this line
>> allgone = '[ * : * ]'
>>
>> Can't seem to get it right, anyone know what it should be?
>>
>> Is it '[all:all]' or something?
>>
>> Any help, greatly appreciated
>>
>>
>>
>>
>>
>
>
> ------------------
> DigitalGlue, India
>
>
>
>
>
--
View this message in context: http://www.nabble.com/DeleteByQuery-python-syntax-for-delte-all-tf4109267.html#a11687320
Sent from the Solr - User mailing list archive at Nabble.com.
Re: DeleteByQuery python syntax for delte all
Posted by Yonik Seeley <yo...@apache.org>.
On 7/19/07, Roopesh P Raj <ro...@digitalglue.in> wrote:
> This should work :
> c.deleteByQyery('id:[* TO *]')
> c.commit()
*:* works in the latest versions of Solr to mean "all documents", and
I think we will be adding special support for that query to quickly
remove the entire index.
-Yonik
Re: DeleteByQuery python syntax for delte all
Posted by Roopesh P Raj <ro...@digitalglue.in>.
This should work :
c.deleteByQyery('id:[* TO *]')
c.commit()
Regards
Roopesh
vanderkerkoff wrote:
> Hello everyone
>
> Loving solr, got an idiot question for you.
>
> I have been manually deleting our index in the python interpretor when
> testing
>
> from solr import SolrConnection
> c = SolrConnection(host='localhost:8983', persistent=False)
> allgone = '[ * : * ]'
> c.deleteByQuery(query=allgone)
> c.commit(optimize-True)
>
> I've forgotten the exact syntax for this line
> allgone = '[ * : * ]'
>
> Can't seem to get it right, anyone know what it should be?
>
> Is it '[all:all]' or something?
>
> Any help, greatly appreciated
>
>
>
>
>
------------------
DigitalGlue, India