2012-04-07 16:42:30 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
2013-04-24 17:14:03 +01:00
|
|
|
* This file is part of the LibreOffice project.
|
2012-04-07 16:42:30 +01:00
|
|
|
*
|
2013-04-24 17:14:03 +01:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2012-04-07 16:42:30 +01:00
|
|
|
*/
|
|
|
|
|
2013-10-23 19:18:54 +02:00
|
|
|
#ifndef INCLUDED_HELPCOMPILER_HELPSEARCH_HXX
|
|
|
|
#define INCLUDED_HELPCOMPILER_HELPSEARCH_HXX
|
2012-02-19 13:49:08 +01:00
|
|
|
|
2012-09-16 16:37:30 +02:00
|
|
|
#include <helpcompiler/dllapi.h>
|
2012-02-19 13:49:08 +01:00
|
|
|
|
|
|
|
#include <rtl/ustring.hxx>
|
|
|
|
#include <vector>
|
|
|
|
|
2012-04-20 11:54:01 +01:00
|
|
|
class L10N_DLLPUBLIC HelpSearch{
|
2016-02-09 09:21:53 +11:00
|
|
|
private:
|
2013-04-07 12:06:47 +02:00
|
|
|
OString d_indexDir;
|
2012-02-19 13:49:08 +01:00
|
|
|
|
2016-02-09 09:21:53 +11:00
|
|
|
public:
|
2012-02-19 13:49:08 +01:00
|
|
|
|
2016-02-09 09:21:53 +11:00
|
|
|
/**
|
|
|
|
* @param indexDir The directory where the index files are stored.
|
|
|
|
*/
|
2014-10-15 15:58:56 +02:00
|
|
|
HelpSearch(OUString const &indexDir);
|
2012-02-19 13:49:08 +01:00
|
|
|
|
2016-02-09 09:21:53 +11:00
|
|
|
/**
|
|
|
|
* Query the index for a certain query string.
|
|
|
|
* @param queryStr The query.
|
|
|
|
* @param captionOnly Set to true to search in the caption, not the content.
|
|
|
|
* @param rDocuments Vector to write the paths of the found documents.
|
|
|
|
* @param rScores Vector to write the scores to.
|
|
|
|
*/
|
2016-01-12 11:13:59 +02:00
|
|
|
void query(OUString const &queryStr, bool captionOnly,
|
2013-04-07 12:06:47 +02:00
|
|
|
std::vector<OUString> &rDocuments, std::vector<float> &rScores);
|
2012-02-19 13:49:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2012-04-07 16:42:30 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|