~ubuntu-branches/ubuntu/raring/clucene-core/raring-proposed

« back to all changes in this revision

Viewing changes to src/CLucene/search/WildcardQuery.h

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2012-08-11 09:33:38 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120811093338-fgrx41ftqew3qt6a
Tags: 2.3.3.4-1
* New upstream release (Closes: #661703).
* Convert package to multiarch.
* Drop obsolete patches:
  - 01_add_missing_include_bug505667.diff
  - 02_posixness_fix_bug530308.diff
* Add patches:
  - Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
  - Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
  - Install-contribs-lib.patch
  - multiarch.patch
* Update debian/compat: bump to 8.
* Update debian/control:
  - update build dependencies (add cmake, libboost-dev and libz-dev).
  - bump Standards-Version to 3.9.3.
  - rename packages due to ABI bump: libclucene0ldbl -> libclucene-core1.
  - add libclucene-contribs1 package.
* Update debian/rules:
  - rewrite to use CMake.
  - add multiarch support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*------------------------------------------------------------------------------
2
 
* Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
3
 
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
 
------------------------------------------------------------------------------*/
7
 
#ifndef _lucene_search_WildcardQuery_
8
 
#define _lucene_search_WildcardQuery_
9
 
#if defined(_LUCENE_PRAGMA_ONCE)
10
 
# pragma once
11
 
#endif
12
 
 
13
 
#include "CLucene/index/IndexReader.h"
14
 
#include "CLucene/index/Term.h"
15
 
#include "MultiTermQuery.h"
16
 
#include "WildcardTermEnum.h"
17
 
 
18
 
CL_NS_DEF(search)
19
 
 
20
 
    /** Implements the wildcard search query. Supported wildcards are <code>*</code>, which
21
 
                 * matches any character sequence (including the empty one), and <code>?</code>,
22
 
                 * which matches any single character. Note this query can be slow, as it
23
 
                 * needs to iterate over all terms. In order to prevent extremely slow WildcardQueries,
24
 
                 * a Wildcard term must not start with one of the wildcards <code>*</code> or
25
 
                 * <code>?</code>.
26
 
                 * 
27
 
                 * @see WildcardTermEnum
28
 
                 */
29
 
    class WildcardQuery: public MultiTermQuery {
30
 
    protected:
31
 
        FilteredTermEnum* getEnum(CL_NS(index)::IndexReader* reader);
32
 
                WildcardQuery(const WildcardQuery& clone);
33
 
    public:
34
 
                WildcardQuery(CL_NS(index)::Term* term);
35
 
                ~WildcardQuery();
36
 
    
37
 
            //Returns the string "WildcardQuery"
38
 
        const TCHAR* getQueryName() const;
39
 
                static const TCHAR* getClassName();
40
 
                
41
 
                size_t hashCode() const;
42
 
                bool equals(Query* other) const;
43
 
                Query* clone() const;
44
 
    };
45
 
    
46
 
    
47
 
    
48
 
class WildcardFilter: public Filter 
49
 
{
50
 
private:
51
 
        CL_NS(index)::Term* term;
52
 
protected:
53
 
        WildcardFilter( const WildcardFilter& copy );
54
 
        
55
 
public:
56
 
        WildcardFilter(CL_NS(index)::Term* term);
57
 
        ~WildcardFilter();
58
 
 
59
 
        /** Returns a BitSet with true for documents which should be permitted in
60
 
        search results, and false for those that should not. */
61
 
        CL_NS(util)::BitSet* bits( CL_NS(index)::IndexReader* reader );
62
 
        
63
 
        Filter* clone() const;
64
 
        TCHAR* toString();
65
 
};
66
 
 
67
 
 
68
 
CL_NS_END
69
 
#endif