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 Johan Oskarsson <jo...@oskarsson.nu> on 2007/05/02 20:09:58 UTC

Delete by filter?

Hi.

First off, thanks for a nice piece of software.

I'm wondering how to delete a range of documents with
a range filter instead of a query. I want to remove all docs with a 
creation date within two dates.

As far as I remember range filters are much quicker then queries in lucene.

/Johan

Re: Delete by filter?

Posted by Chris Hostetter <ho...@fucit.org>.
: I'm wondering how to delete a range of documents with
: a range filter instead of a query. I want to remove all docs with a
: creation date within two dates.
:
: As far as I remember range filters are much quicker then queries in lucene.

Never fear, the default query parser in Solr does a lot of query magic
under the covers to make things "better" ... if you do a deleteByQuery and
your query is a range query, Solr will parse it as a ConstantScoreQuery
(backed by a range filter)


(FYI: Filter's aren't neccessarily faster then queries, they just have
different memory characteristics, dictated by the number of docs instead
of by the number of terms)



:
: /Johan
:



-Hoss