Class CompiledQueryProfileRegistry
- java.lang.Object
-
- com.yahoo.component.provider.ComponentRegistry<CompiledQueryProfile>
-
- com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry
-
public class CompiledQueryProfileRegistry extends com.yahoo.component.provider.ComponentRegistry<CompiledQueryProfile>
A set of compiled query profiles.- Author:
- bratseth
-
-
Field Summary
Fields Modifier and Type Field Description static CompiledQueryProfileRegistry
empty
The empty, frozen registry
-
Constructor Summary
Constructors Constructor Description CompiledQueryProfileRegistry()
Creates a compiled query profile registry with no typesCompiledQueryProfileRegistry(QueryProfilesConfig config, Executor executor)
CompiledQueryProfileRegistry(QueryProfileTypeRegistry typeRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompiledQueryProfile
findQueryProfile(String idString)
Returns a query profile for the given request string, or null if a suitable one is not found.QueryProfileTypeRegistry
getTypeRegistry()
void
register(CompiledQueryProfile profile)
Registers a type by its id
-
-
-
Field Detail
-
empty
public static final CompiledQueryProfileRegistry empty
The empty, frozen registry
-
-
Constructor Detail
-
CompiledQueryProfileRegistry
@Inject public CompiledQueryProfileRegistry(QueryProfilesConfig config, Executor executor)
-
CompiledQueryProfileRegistry
public CompiledQueryProfileRegistry()
Creates a compiled query profile registry with no types
-
CompiledQueryProfileRegistry
public CompiledQueryProfileRegistry(QueryProfileTypeRegistry typeRegistry)
-
-
Method Detail
-
register
public final void register(CompiledQueryProfile profile)
Registers a type by its id
-
getTypeRegistry
public QueryProfileTypeRegistry getTypeRegistry()
-
findQueryProfile
public CompiledQueryProfile findQueryProfile(String idString)
Returns a query profile for the given request string, or null if a suitable one is not found.
The request string must be a validComponentId
or null.
If the string is null, the profile named "default" is returned, or null if that does not exists.The version part (if any) is matched used the usual component version patching rules. If the name part matches a query profile name perfectly, that profile is returned. If not, and the name is a slash-separated path, the profile with the longest matching left sub-path which has a type which allows path matching is used. If there is no such profile, null is returned.
-
-