aboutsummaryrefslogtreecommitdiffstats
path: root/streamingvisitors/src/vespa/searchvisitor/matching_elements_filler.h
blob: 987efec3d46b4d83ac53c9f1db33da16134d2df4 (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
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vsm/vsm/i_matching_elements_filler.h>

namespace search::streaming { class Query; }
namespace vdslib { class SearchResult; }
namespace vsm {
class FieldIdTSearcherMap;
class StorageDocument;
}

namespace streaming {

class HitCollector;

/*
 * Class for filling matching elements structure for streaming search
 * based on query and struct field mapper.
 */
class MatchingElementsFiller : public vsm::IMatchingElementsFiller {
    vsm::FieldIdTSearcherMap& _field_searcher_map;
    search::streaming::Query& _query;
    HitCollector&             _hit_collector;
    vdslib::SearchResult&     _search_result;

public:
    MatchingElementsFiller(vsm::FieldIdTSearcherMap& field_searcher_map, search::streaming::Query& query,
                           HitCollector& hit_collector, vdslib::SearchResult& search_result);
    virtual ~MatchingElementsFiller();
    std::unique_ptr<search::MatchingElements> fill_matching_elements(const search::MatchingElementsFields& fields) override;
};
    
}