lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: Delete documents with empty fields
Date Thu, 15 Sep 2011 11:01:57 GMT
> I want to delete all documents with
> empty title field.
> If i run the query -title:[* TO *] I obtain the correct
> list of documents but when I submit to solr the delete
> command:
> 
> curl http://localhost:8080/solr/web/update\?commit=true -H
> 'Content-Type: text/xml' --data-binary \
> '<delete><query>-title:[* TO
> *]</query></delete>'
> 
> none of the documents were deleted.
> 
> After a bit of debugging I have noted that the query was
> internally rewritten by
> org.apache.lucene.search.Searcher.createNormalizedWeight to
> an empty query.
> 
> It is a bug or there is another way to do this operation?
> (or there is no way?)

Not sure but '<delete><query>+*:* -title:[* TO *]</query></delete>'
may do the trick.

Mime
View raw message