diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-05-23 13:08:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-23 13:08:47 +0200 |
commit | 0fa6036254da751e0e38f77c20a419124b8af800 (patch) | |
tree | 657984ca049491cc274f8d57e010159785a901c3 /container-search/src/main/java/com/yahoo/prelude/IndexFacts.java | |
parent | bbfa8456064e99c65ea4e78902d4fb02591ee7f3 (diff) |
Revert "Bratseth/iterate over indexes not fields"
Diffstat (limited to 'container-search/src/main/java/com/yahoo/prelude/IndexFacts.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/prelude/IndexFacts.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/container-search/src/main/java/com/yahoo/prelude/IndexFacts.java b/container-search/src/main/java/com/yahoo/prelude/IndexFacts.java index bdf395c1f0b..b899f690ee1 100644 --- a/container-search/src/main/java/com/yahoo/prelude/IndexFacts.java +++ b/container-search/src/main/java/com/yahoo/prelude/IndexFacts.java @@ -166,8 +166,8 @@ public class IndexFacts { } private Index getIndexFromDocumentTypes(String indexName, List<String> documentTypes) { - if (indexName == null || indexName.isEmpty()) - indexName = "default"; + if (indexName==null || indexName.isEmpty()) + indexName="default"; return getIndexByCanonicNameFromDocumentTypes(indexName, documentTypes); } @@ -191,13 +191,6 @@ public class IndexFacts { return Index.nullIndex; } - private Collection<Index> getIndexes(String documentType) { - if ( ! isInitialized()) return Collections.emptyList(); - SearchDefinition sd = searchDefinitions.get(documentType); - if (sd == null) return Collections.emptyList(); - return sd.indices().values(); - } - /** Calls resolveDocumentTypes(query.getModel().getSources(), query.getModel().getRestrict()) */ private Set<String> resolveDocumentTypes(Query query) { // Assumption: Search definition name equals document name. @@ -428,11 +421,6 @@ public class IndexFacts { return IndexFacts.this.getIndexFromDocumentTypes(indexName, Collections.singletonList(documentType)); } - /** Returns all the indexes of a given search definition */ - public Collection<Index> getIndexes(String documentType) { - return IndexFacts.this.getIndexes(documentType); - } - /** * Returns the canonical form of the index name (Which may be the same as * the input). |