blob: 6004e45a0efa5a5eccfcdfddef7425ce3485248e (
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
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "isearchableindexcollection.h"
#include <vespa/searchlib/queryeval/isourceselector.h>
namespace searchcorespi {
using search::queryeval::ISourceSelector;
void
ISearchableIndexCollection::setCurrentIndex(uint32_t id)
{
assert( id < ISourceSelector::SOURCE_LIMIT);
_currentIndex = id;
}
uint32_t
ISearchableIndexCollection::getCurrentIndex() const
{
assert( valid() );
return _currentIndex;
}
bool
ISearchableIndexCollection::valid() const
{
return (_currentIndex > 0) && (_currentIndex < ISourceSelector::SOURCE_LIMIT);
}
}
|