You need to explicitly define the field you are referring to in order to achieve this, otherwise the query parser will assume that the minus character is part of the query and interpret it as field:"-solr" (where "field" is the name of the default field set in your schema). Try:
curl http://localhost:8983/solr/update --data-binary '<delete><query>-field:solr</query></delete>' -H 'Content-type:text/xml; charset=utf-8' Piete On 16/10/2007, Rob Casson <[EMAIL PROTECTED]> wrote: > > i'm having no luck deleting by a negative query.... > > indexing the example docs from 1.2, these steps work: > > curl http://localhost:8983/solr/update --data-binary > '<delete><query>solr</query></delete>' -H 'Content-type:text/xml; > charset=utf-8' > > curl http://localhost:8983/solr/update --data-binary '<optimize />' -H > 'Content-type:text/xml; charset=utf-8' > > but if i reindex, and change the delete query to a negative, the > non-'solr' docs don't get deleted: > > curl http://localhost:8983/solr/update --data-binary > '<delete><query>-solr</query></delete>' -H 'Content-type:text/xml; > charset=utf-8' > > curl http://localhost:8983/solr/update --data-binary '<optimize />' -H > 'Content-type:text/xml; charset=utf-8' > > good chance i'm missing something obvious.... > > tia, > r >