blob: 6466f7c2a6ad699d9e8f5c48ca9af164e2568e16 (
plain) (
blame)
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <memory>
namespace search::queryeval {
class SearchIterator;
class ExecuteInfo;
}
namespace search::fef { class TermFieldMatchData; }
namespace search::attribute {
/**
* Interface for search context helper classes to create attribute
* search iterators based on posting lists and using dictionary
* information to better estimate number of hits. Also used for
* enumerated attributes without posting lists to eliminate brute
* force searches for nonexisting values.
*/
class IPostingListSearchContext
{
protected:
IPostingListSearchContext() { }
virtual ~IPostingListSearchContext() { }
public:
virtual void fetchPostings(const queryeval::ExecuteInfo & execInfo) = 0;
virtual std::unique_ptr<queryeval::SearchIterator> createPostingIterator(fef::TermFieldMatchData *matchData, bool strict) = 0;
virtual unsigned int approximateHits() const = 0;
};
}
|