Delete by filter?

2007-05-02 Thread Johan Oskarsson

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?

2007-05-02 Thread Chris Hostetter

: 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