delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / runtime / nepomuk / services / storage / cluceneanalyzer.h
blobfac653d9fc2d216cb55d6bb52f52b4a5e05f52ef
1 /*
2 * Modified version of StandardAnalyzer.h for Nepomuk mostly to optimize for filename indexing
3 * Copyright (C) 2008 Sebastian Trueg <trueg@kde.org>
5 * Based on StandardAnalyzer.h from the CLucene package.
6 * Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef _NEPOMUK_CLUCENE_ANALYZER_H_
25 #define _NEPOMUK_CLUCENE_ANALYZER_H_
27 #include <CLucene.h>
28 #include <CLucene/clucene-config.h>
29 #include <CLucene/StdHeader.h>
30 #include <CLucene/util/VoidMap.h>
31 #include <CLucene/util/Reader.h>
32 #include <CLucene/analysis/AnalysisHeader.h>
33 #include <CLucene/analysis/Analyzers.h>
36 namespace Nepomuk {
38 /** Represents a standard analyzer. */
39 class CLuceneAnalyzer : public CL_NS(analysis)::Analyzer
41 public:
42 /** Builds an analyzer.*/
43 CLuceneAnalyzer();
45 /** Builds an analyzer with the given stop words. */
46 CLuceneAnalyzer( const TCHAR** stopWords);
48 ~CLuceneAnalyzer();
50 /**
51 * Constructs a StandardTokenizer filtered by a
52 * StandardFilter, a LowerCaseFilter and a StopFilter.
54 CL_NS(analysis)::TokenStream* tokenStream(const TCHAR* fieldName, CL_NS(util)::Reader* reader);
56 private:
57 CL_NS(util)::CLSetList<const TCHAR*> stopSet;
61 #endif