aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/memoryindex/field_index_base.cpp
blob: dd9cba849bc6a40b8092677b3ea9b08b1afe5562 (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
37
38
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#include "field_index_base.h"
#include "i_ordered_field_index_inserter.h"
#include <vespa/vespalib/stllike/asciistream.h>

namespace search::memoryindex {

vespalib::asciistream &
operator<<(vespalib::asciistream& os, const FieldIndexBase::WordKey& rhs)
{
    os << "wr(" << rhs._wordRef.ref() << ")";
    return os;
}

FieldIndexBase::FieldIndexBase(const index::Schema& schema, uint32_t fieldId)
    : FieldIndexBase(schema, fieldId, index::FieldLengthInfo())
{
}

FieldIndexBase::FieldIndexBase(const index::Schema& schema, uint32_t fieldId,
                               const index::FieldLengthInfo& info)
    : _wordStore(),
      _numUniqueWords(0),
      _generationHandler(),
      _dict(),
      _featureStore(schema),
      _fieldId(fieldId),
      _remover(_wordStore),
      _inserter(),
      _calculator(info)
{
}

FieldIndexBase::~FieldIndexBase() = default;

}