1
/*------------------------------------------------------------------------------
2
* Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
4
* Distributable under the terms of either the Apache License (Version 2.0) or
5
* the GNU Lesser General Public License, as specified in the COPYING file.
6
------------------------------------------------------------------------------*/
8
#ifndef _lucene_search_RangeFilter_
9
#define _lucene_search_RangeFilter_
11
#include "CLucene/document/DateField.h"
12
#include "CLucene/index/Term.h"
13
#include "CLucene/index/Terms.h"
14
#include "CLucene/index/IndexReader.h"
15
#include "CLucene/util/BitSet.h"
16
#include "CLucene/search/Filter.h"
20
class RangeFilter: public Filter
30
RangeFilter( const RangeFilter& copy );
33
RangeFilter( const TCHAR* fieldName, const TCHAR* lowerValue, const TCHAR* upperValue, bool includeLower, bool includeUpper );
35
static RangeFilter* Less( TCHAR* fieldName, TCHAR* upperTerm );
37
static RangeFilter* More( TCHAR* fieldName, TCHAR* lowerTerm );
41
/** Returns a BitSet with true for documents which should be permitted in
42
search results, and false for those that should not. */
43
CL_NS(util)::BitSet* bits( CL_NS(index)::IndexReader* reader );
45
Filter* clone() const;