1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the Qt Assistant of the Qt Toolkit. |
7 ** This file is part of the Qt Assistant of the Qt Toolkit. |
8 ** |
8 ** |
61 #include <QtCore/QPointer> |
61 #include <QtCore/QPointer> |
62 |
62 |
63 QT_BEGIN_NAMESPACE |
63 QT_BEGIN_NAMESPACE |
64 |
64 |
65 #if defined(QT_CLUCENE_SUPPORT) |
65 #if defined(QT_CLUCENE_SUPPORT) |
66 using namespace qt::fulltextsearch::clucene; |
66 using namespace fulltextsearch::clucene; |
67 #else |
67 #else |
68 using namespace qt::fulltextsearch::std; |
68 using namespace fulltextsearch::std; |
69 #endif |
69 #endif |
70 |
70 |
71 class QHelpSearchEnginePrivate : public QObject |
71 class QHelpSearchEnginePrivate : public QObject |
72 { |
72 { |
73 Q_OBJECT |
73 Q_OBJECT |
193 friend class QHelpSearchEngine; |
193 friend class QHelpSearchEngine; |
194 |
194 |
195 QHelpSearchQueryWidget *queryWidget; |
195 QHelpSearchQueryWidget *queryWidget; |
196 QHelpSearchResultWidget *resultWidget; |
196 QHelpSearchResultWidget *resultWidget; |
197 |
197 |
198 qt::fulltextsearch::QHelpSearchIndexReader *indexReader; |
198 fulltextsearch::QHelpSearchIndexReader *indexReader; |
199 QHelpSearchIndexWriter *indexWriter; |
199 QHelpSearchIndexWriter *indexWriter; |
200 |
200 |
201 QPointer<QHelpEngineCore> helpEngine; |
201 QPointer<QHelpEngineCore> helpEngine; |
202 |
202 |
203 QList<QHelpSearchQuery> m_queryList; |
203 QList<QHelpSearchQuery> m_queryList; |
212 \inmodule QtHelp |
212 \inmodule QtHelp |
213 \brief The QHelpSearchQuery class contains the field name and the associated |
213 \brief The QHelpSearchQuery class contains the field name and the associated |
214 search term |
214 search term |
215 |
215 |
216 The QHelpSearchQuery class contains the field name and the associated search |
216 The QHelpSearchQuery class contains the field name and the associated search |
217 term. Depending on the field the search term might get split up into seperate |
217 term. Depending on the field the search term might get split up into separate |
218 terms to be parsed differently by the search engine. |
218 terms to be parsed differently by the search engine. |
219 |
219 |
220 \sa QHelpSearchQueryWidget |
220 \sa QHelpSearchQueryWidget |
221 */ |
221 */ |
222 |
222 |
236 \enum QHelpSearchQuery::FieldName |
236 \enum QHelpSearchQuery::FieldName |
237 This enum type specifies the field names that are handled by the search engine. |
237 This enum type specifies the field names that are handled by the search engine. |
238 |
238 |
239 \value DEFAULT the default field provided by the search widget, several terms should be |
239 \value DEFAULT the default field provided by the search widget, several terms should be |
240 split and stored in the word list except search terms enclosed in quotes. |
240 split and stored in the word list except search terms enclosed in quotes. |
241 \value FUZZY a field only provided in use with clucene. Terms should be split in seperate |
241 \value FUZZY a field only provided in use with clucene. Terms should be split in separate |
242 words and passed to the search engine. |
242 words and passed to the search engine. |
243 \value WITHOUT a field only provided in use with clucene. Terms should be split in seperate |
243 \value WITHOUT a field only provided in use with clucene. Terms should be split in separate |
244 words and passed to the search engine. |
244 words and passed to the search engine. |
245 \value PHRASE a field only provided in use with clucene. Terms should not be split in seperate |
245 \value PHRASE a field only provided in use with clucene. Terms should not be split in separate |
246 words. |
246 words. |
247 \value ALL a field only provided in use with clucene. Terms should be split in seperate |
247 \value ALL a field only provided in use with clucene. Terms should be split in separate |
248 words and passed to the search engine |
248 words and passed to the search engine |
249 \value ATLEAST a field only provided in use with clucene. Terms should be split in seperate |
249 \value ATLEAST a field only provided in use with clucene. Terms should be split in separate |
250 words and passed to the search engine |
250 words and passed to the search engine |
251 */ |
251 */ |
252 |
252 |
253 /*! |
253 /*! |
254 \class QHelpSearchEngine |
254 \class QHelpSearchEngine |