forked from manticoresoftware/manticoresearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global_idf.h
37 lines (30 loc) · 1.09 KB
/
global_idf.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// Copyright (c) 2017-2023, Manticore Software LTD (https://manticoresearch.com)
// Copyright (c) 2001-2016, Andrew Aksyonoff
// Copyright (c) 2008-2016, Sphinx Technologies Inc
// All rights reserved
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License. You should have
// received a copy of the GPL license along with this program; if you
// did not, you can find it at http://www.gnu.org/
//
#ifndef MANTICORE_GLOBAL_IDF_H
#define MANTICORE_GLOBAL_IDF_H
#include "sphinxstd.h"
namespace sph {
class IDFer_c : public ISphRefcountedMT
{
protected:
~IDFer_c () override = default;
public:
virtual float GetIDF ( const CSphString& sWord, int64_t iDocsLocal, bool bPlainIDF ) const = 0;
};
using IDFerRefPtr_c = CSphRefcountedPtr<IDFer_c>;
IDFerRefPtr_c GetIDFer ( const CSphString& IDFPath );
/// update/clear global IDF cache
bool PrereadGlobalIDF ( const CSphString& sPath, CSphString& sError );
void UpdateGlobalIDFs ( const StrVec_t& dFiles );
void ShutdownGlobalIDFs ();
}
#endif //MANTICORE_GLOBAL_IDF_H