summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/types/QueryProfileTypeRegistry.java8
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;