Package com.yahoo.schema
Class RankProfileRegistry
java.lang.Object
com.yahoo.schema.RankProfileRegistry
Mapping from name to
RankProfile
as well as a reverse mapping of RankProfile
to Schema
.
Having both of these mappings consolidated here make it easier to remove dependencies on these mappings at
run time, since it is essentially only used when building rank profile config at deployment time.
Global rank profiles are represented by the Search key null.- Author:
- Ulf Lilleengen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(RankProfile rankProfile) Adds a rank profile to this registryall()
Rank profiles that are collected across clusters.static RankProfileRegistry
get
(ImmutableSchema schema, String name) Returns a named rank profile, null if the search definition doesn't have one with the given namerankProfilesOf
(ImmutableSchema schema) Retrieve all rank profiles for a schemaresolve
(SDDocumentType docType, String name)
-
Constructor Details
-
RankProfileRegistry
public RankProfileRegistry()
-
-
Method Details
-
createRankProfileRegistryWithBuiltinRankProfiles
-
add
Adds a rank profile to this registry -
get
Returns a named rank profile, null if the search definition doesn't have one with the given name- Parameters:
schema
- theSchema
that owns the rank profilename
- the name of the rank profile- Returns:
- the RankProfile to return.
-
get
-
getGlobal
-
resolve
-
all
Rank profiles that are collected across clusters.- Returns:
- a set of global
RankProfile
instances
-
rankProfilesOf
Retrieve all rank profiles for a schema- Parameters:
schema
- the schema to fetch rank profiles for, or null for the global ones- Returns:
- a collection of
RankProfile
instances
-