SearchSpec.Builder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Builder for SearchSpec objects.
[Android.Runtime.Register("android/app/appsearch/SearchSpec$Builder", ApiSince=31, DoNotGenerateAcw=true)]
public sealed class SearchSpec.Builder : Java.Lang.Object
[<Android.Runtime.Register("android/app/appsearch/SearchSpec$Builder", ApiSince=31, DoNotGenerateAcw=true)>]
type SearchSpec.Builder = class
inherit Object
- Inheritance
- Attributes
Remarks
Builder for SearchSpec objects.
Java documentation for android.app.appsearch.SearchSpec.Builder.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
| Name | Description |
|---|---|
| SearchSpec.Builder() |
Constructs a new |
| SearchSpec.Builder(SearchSpec) |
Constructs a new |
Properties
| Name | Description |
|---|---|
| Class |
Returns the runtime class of this |
| Handle |
The handle to the underlying Android instance. (Inherited from Object) |
| JniIdentityHashCode |
Gets the identity hash code assigned to this Java peer by the interop runtime. (Inherited from Object) |
| JniManagedPeerState | (Inherited from JavaObject) |
| JniPeerMembers | |
| PeerReference |
Gets the JNI object reference for this Java peer. (Inherited from Object) |
| ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from Object) |
| ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from Object) |
Methods
| Name | Description |
|---|---|
| AddEmbeddingParameters(EmbeddingVector[]) |
Adds an embedding search to SearchSpec Entry, which will be referred in the query expression and the ranking expression for embedding search. |
| AddEmbeddingParameters(ICollection<EmbeddingVector>) |
Adds an embedding search to SearchSpec Entry, which will be referred in the query expression and the ranking expression for embedding search. |
| AddFilterDocumentIds(ICollection<String>) |
Adds a document id filter to SearchSpec Entry. |
| AddFilterDocumentIds(String[]) |
Adds a document id filter to SearchSpec Entry. |
| AddFilterNamespaces(ICollection<String>) |
Adds a namespace filter to SearchSpec Entry. |
| AddFilterNamespaces(String[]) |
Adds a namespace filter to SearchSpec Entry. |
| AddFilterPackageNames(ICollection<String>) |
Adds a package name filter to SearchSpec Entry. |
| AddFilterPackageNames(String[]) |
Adds a package name filter to SearchSpec Entry. |
| AddFilterProperties(String, ICollection<String>) |
Adds property paths for the specified type to the property filter of SearchSpec Entry. |
| AddFilterPropertyPaths(String, ICollection<PropertyPath>) |
Adds property paths for the specified type to the property filter of SearchSpec Entry. |
| AddFilterSchemas(ICollection<String>) |
Adds a Schema type filter to SearchSpec Entry. |
| AddFilterSchemas(String[]) |
Adds a Schema type filter to SearchSpec Entry. |
| AddInformationalRankingExpressions(ICollection<String>) |
Adds informational ranking expressions to be evaluated for each document in the search result. |
| AddInformationalRankingExpressions(String[]) |
Adds informational ranking expressions to be evaluated for each document in the search result. |
| AddProjection(String, ICollection<String>) |
Adds property paths for the specified type to be used for projection. |
| AddProjectionPaths(String, ICollection<PropertyPath>) |
Adds property paths for the specified type to be used for projection. |
| AddSearchStringParameters(IList<String>) |
Adds Strings to the list of String parameters that can be referenced in the query through the "getSearchStringParameter({index})" function. |
| AddSearchStringParameters(String[]) |
Adds Strings to the list of String parameters that can be referenced in the query through the "getSearchStringParameter({index})" function. |
| Build() |
Constructs a new |
| ClearEmbeddingParameters() |
Clears the embedding parameters. |
| ClearFilterDocumentIds() |
Clears the document id filters. |
| ClearFilterNamespaces() |
Clears all namespace filters. |
| ClearFilterPackageNames() |
Clears all package name filters. |
| ClearFilterProperties() |
Clears the property filters for all schema types. |
| ClearFilterSchemas() |
Clears all schema type filters. |
| ClearInformationalRankingExpressions() |
Clears all informational ranking expressions. |
| ClearJoinSpec() |
Clears the JoinSpec. |
| ClearProjections() |
Clears the projections for all schema types. |
| ClearPropertyWeights() |
Clears the property weights for all schema types. |
| ClearResultGrouping() |
Clears the result grouping and limit. |
| ClearSearchSourceLogTag() |
Clears the log tag that indicates the source of this search. |
| ClearSearchStringParameters() |
Clears the list of String parameters that can be referenced in the query through the "getSearchStringParameter({index})" function. |
| Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
| Construct(JniObjectReference, JniObjectReferenceOptions) | (Inherited from JavaObject) |
| Dispose() |
Releases the resources held by this Java peer. (Inherited from Object) |
| Dispose(Boolean) |
Releases the resources held by this Java peer. (Inherited from Object) |
| DisposeUnlessReferenced() | (Inherited from JavaObject) |
| Equals(Object) | (Inherited from JavaObject) |
| Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
| GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
| JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
| Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
| NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
| SetDefaultEmbeddingSearchMetricType(Int32) |
Sets the default embedding metric type used for embedding search (see AppSearchSession.search ) and ranking (see SearchSpec.Builder.setRankingStrategy(String) ). |
| SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
| SetJoinSpec(JoinSpec) |
Specifies which documents to join with, and how to join. |
| SetListFilterHasPropertyFunctionEnabled(Boolean) |
Sets the LIST_FILTER_HAS_PROPERTY_FUNCTION feature as enabled/disabled according to the enabled parameter. |
| SetListFilterMatchScoreExpressionFunctionEnabled(Boolean) |
Sets the LIST_FILTER_MATCH_SCORE_EXPRESSION_FUNCTION feature as enabled/disabled according to the enabled parameter. |
| SetListFilterQueryLanguageEnabled(Boolean) |
Sets the LIST_FILTER_QUERY_LANGUAGE feature as enabled/disabled according to the enabled parameter. |
| SetMaxSnippetSize(Int32) |
Sets maxSnippetSize, the maximum snippet size. |
| SetNumericSearchEnabled(Boolean) |
Sets the NUMERIC_SEARCH feature as enabled/disabled according to the enabled parameter. |
| SetOrder(Int32) |
Sets the order of returned search results, the default is SearchSpec.ORDER_DESCENDING, meaning that results with higher scores come first. |
| SetPeerReference(JniObjectReference, JniObjectReferenceOptions) | (Inherited from JavaObject) |
| SetPropertyWeightPaths(String, IDictionary<PropertyPath,Double>) |
Sets property weights by schema type and property path. |
| SetPropertyWeights(String, IDictionary<String,Double>) |
Sets property weights by schema type and property path. |
| SetRankingStrategy(Int32) |
Sets ranking strategy for AppSearch results. |
| SetRankingStrategy(String) |
Enables advanced ranking to score based on advancedRankingExpression. |
| SetResultCountPerPage(Int32) |
Sets the number of results per page in the returned object. |
| SetResultGrouping(Int32, Int32) |
Sets the maximum number of results to return for each group, where groups are defined by grouping type. |
| SetRetrieveEmbeddingMatchInfos(Boolean) |
Sets whether to retrieve embedding match infos as a part of SearchResult.getMatchInfos(). |
| SetScorablePropertyRankingEnabled(Boolean) |
Sets the ScorablePropertyRanking feature as enabled or disabled. |
| SetSearchSourceLogTag(String) |
Sets an optional log tag to indicate the source of this search. |
| SetSnippetCount(Int32) |
Sets the snippetCount such that the first snippetCount documents based on the ranking strategy will have snippet information provided. |
| SetSnippetCountPerProperty(Int32) |
Sets snippetCountPerProperty. |
| SetTermMatch(Int32) |
Sets how the query terms should match TermMatchCode in the index. |
| SetVerbatimSearchEnabled(Boolean) |
Sets the VERBATIM_SEARCH feature as enabled/disabled according to the enabled parameter. |
| ToArray<T>() |
Creates a managed array from this Java array wrapper. (Inherited from Object) |
| ToString() |
Returns a string representation of the object. (Inherited from Object) |
| UnregisterFromRuntime() |
Unregisters this Java peer from the interop runtime. (Inherited from Object) |
| Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
| Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
| Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
| Name | Description |
|---|---|
| IJavaPeerable.Disposed() | (Inherited from JavaObject) |
| IJavaPeerable.Finalized() | (Inherited from JavaObject) |
| IJavaPeerable.JniObjectReferenceControlBlock | (Inherited from JavaObject) |
| IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from JavaObject) |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from JavaObject) |
| IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from JavaObject) |
Extension Methods
| Name | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
Gets the JNI name of the type of the instance |
| JavaAs<TResult>(IJavaPeerable) |
Try to coerce |
| JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
| JavaCast<TResult>(IJavaObject) | |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
Try to coerce |