blob: efd9ed5e88f95f2d28fe080432e63f7e6d3c8817 (
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
39
40
41
42
43
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition;
import com.yahoo.config.application.api.ApplicationPackage;
import com.yahoo.searchdefinition.document.ImmutableSDField;
import com.yahoo.searchdefinition.document.SDField;
import com.yahoo.vespa.documentmodel.SummaryField;
import java.io.Reader;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;
/**
* An interface containing the non-mutating methods of {@link Search}.
* For description of the methods see {@link Search}.
*
* @author bjorncs
*/
public interface ImmutableSearch {
String getName();
Index getIndex(String name);
ImmutableSDField getConcreteField(String name);
//TODO split in mutating/immutable by returning List<ImmutableSDField>
List<SDField> allConcreteFields();
List<Index> getExplicitIndices();
Reader getRankingExpression(String fileName);
ApplicationPackage applicationPackage();
RankingConstants rankingConstants();
RankExpressionFiles rankExpressionFiles();
OnnxModels onnxModels();
Stream<ImmutableSDField> allImportedFields();
ImmutableSDField getField(String name);
default Stream<ImmutableSDField> allFields() {
return allFieldsList().stream();
}
List<ImmutableSDField> allFieldsList();
Map<String, SummaryField> getSummaryFields(ImmutableSDField field);
}
|