⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prefixquery.h

📁 clucene是c++版的全文检索引擎,完全移植于lucene,采用 stl 编写.
💻 H
字号:
/*------------------------------------------------------------------------------
* Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
* 
* Distributable under the terms of either the Apache License (Version 2.0) or 
* the GNU Lesser General Public License, as specified in the COPYING file.
------------------------------------------------------------------------------*/
#ifndef _lucene_search_PrefixQuery
#define _lucene_search_PrefixQuery
#if defined(_LUCENE_PRAGMA_ONCE)
# pragma once
#endif

#ifndef NO_PREFIX_QUERY

#include "CLucene/index/Term.h"
#include "CLucene/index/Terms.h"
#include "CLucene/index/IndexReader.h"
#include "SearchHeader.h"
#include "BooleanQuery.h"
#include "TermQuery.h"
#include "CLucene/util/StringBuffer.h"

CL_NS_DEF(search) 
	//PrefixQuery is a Query that matches documents containing terms with a specified prefix.

	class PrefixQuery: public Query {
	private:
		CL_NS(index)::Term* prefix;
	protected:
		PrefixQuery(const PrefixQuery& clone);
	public:

		//Constructor. Constructs a query for terms starting with prefix
		PrefixQuery(CL_NS(index)::Term* Prefix);

		//Destructor
		~PrefixQuery();

		//Returns the name "PrefixQuery"
		const TCHAR* getQueryName() const;
		static const TCHAR* getClassName();

		/** Returns the prefix of this query. */
		CL_NS(index)::Term* getPrefix(bool pointer=true);

		Query* combine(Query** queries);
		Query* rewrite(CL_NS(index)::IndexReader* reader);
		Query* clone() const;
		bool equals(Query * other) const;

		//Creates a user-readable version of this query and returns it as as string
		TCHAR* toString(const TCHAR* field) const;

		size_t hashCode() const;
	};
CL_NS_END
#endif
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -