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

« back to all changes in this revision

Viewing changes to src/core/CLucene/search/spans/SpanFirstQuery.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_spans_FirstSpanQuery_
 
8
#define _lucene_search_spans_FirstSpanQuery_
 
9
 
 
10
CL_CLASS_DEF(index, IndexReader);
 
11
#include "SpanQuery.h"
 
12
 
 
13
CL_NS_DEF2( search, spans )
 
14
 
 
15
/** Matches spans near the beginning of a field. */
 
16
class CLUCENE_EXPORT SpanFirstQuery : public SpanQuery
 
17
{
 
18
private:
 
19
    class SpanFirstQuerySpans;
 
20
 
 
21
private:
 
22
    SpanQuery *     match;
 
23
    bool            bDeleteQuery;
 
24
    int32_t         end;
 
25
 
 
26
protected:
 
27
    SpanFirstQuery( const SpanFirstQuery& clone );
 
28
 
 
29
public:
 
30
    /** Construct a SpanFirstQuery matching spans in <code>match</code> whose end
 
31
     * position is less than or equal to <code>end</code>. */
 
32
    SpanFirstQuery( SpanQuery * match, int32_t end, bool bDeleteQuery );
 
33
    virtual ~SpanFirstQuery();
 
34
 
 
35
    CL_NS(search)::Query * clone() const;
 
36
 
 
37
    static const char * getClassName();
 
38
        const char * getObjectName() const;
 
39
 
 
40
    /** Return the SpanQuery whose matches are filtered. */
 
41
    SpanQuery * getMatch() const;
 
42
 
 
43
    /** Return the maximum end position permitted in a match. */
 
44
    int32_t getEnd() const;
 
45
 
 
46
    const TCHAR * getField() const;
 
47
 
 
48
    /** Returns a collection of all terms matched by this query.
 
49
     * @deprecated use extractTerms instead
 
50
     * @see #extractTerms(Set)
 
51
     */
 
52
//   public Collection getTerms() { return match.getTerms(); }
 
53
    void extractTerms( CL_NS(search)::TermSet * terms ) const;
 
54
 
 
55
    CL_NS(search)::Query * rewrite( CL_NS(index)::IndexReader * reader );
 
56
 
 
57
    using Query::toString;
 
58
    TCHAR* toString( const TCHAR* field ) const;
 
59
    bool equals( Query* other ) const;
 
60
    size_t hashCode() const;
 
61
 
 
62
    Spans * getSpans( CL_NS(index)::IndexReader * reader );
 
63
};
 
64
 
 
65
CL_NS_END2
 
66
#endif // _lucene_search_spans_FirstSpanQuery_