diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-10 23:09:55 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2019-06-10 23:09:55 +0200 |
commit | 99cd8027a4f0f031294c3a53f10158953cb4e77b (patch) | |
tree | 988236bedadf69a284d245be0385640c624e0ca9 /container-search/src | |
parent | c760fc10a1759e903aef9d2e7d78eae3cce9817f (diff) |
Holistic query profile validation
Diffstat (limited to 'container-search/src')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java b/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java index ff8c4845845..b76ae88ede1 100644 --- a/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java +++ b/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java @@ -12,8 +12,11 @@ import com.yahoo.search.query.profile.QueryProfileRegistry; */ public class QueryProfileTypeRegistry extends ComponentRegistry<QueryProfileType> { + private final int nativeProfileCount; + public QueryProfileTypeRegistry() { Query.addNativeQueryProfileTypesTo(this); + nativeProfileCount = allComponents().size(); } /** Register this type by its id */ @@ -21,6 +24,11 @@ public class QueryProfileTypeRegistry extends ComponentRegistry<QueryProfileType super.register(type.getId(), type); } + /** Returns true if this has types in addition to the native Vespa types */ + public boolean hasApplicationTypes() { + return allComponents().size() > nativeProfileCount; + } + @Override public void freeze() { if (isFrozen()) return; |