Share via


SearchSpec Class

Definition

This class represents the specification logic for AppSearch.

[Android.Runtime.Register("android/app/appsearch/SearchSpec", ApiSince=31, DoNotGenerateAcw=true)]
public sealed class SearchSpec : Java.Lang.Object
[Android.Runtime.Register("android/app/appsearch/SearchSpec", ApiSince=31, DoNotGenerateAcw=true)]
public sealed class SearchSpec : Java.Lang.Object, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/app/appsearch/SearchSpec", ApiSince=31, DoNotGenerateAcw=true)>]
type SearchSpec = class
    inherit Object
[<Android.Runtime.Register("android/app/appsearch/SearchSpec", ApiSince=31, DoNotGenerateAcw=true)>]
type SearchSpec = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
SearchSpec
Attributes
Implements

Remarks

This class represents the specification logic for AppSearch. It can be used to set the type of search, like prefix or exact only or apply filters to search for a specific schema type only etc.

Java documentation for android.app.appsearch.SearchSpec.

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.

Fields

GroupingTypePerNamespace
Obsolete.

Results should be grouped together by namespace for the purpose of enforcing a limit on the number of results returned per namespace.

GroupingTypePerPackage
Obsolete.

Results should be grouped together by package for the purpose of enforcing a limit on the number of results returned per package.

GroupingTypePerSchema
Obsolete.

Results should be grouped together by schema type for the purpose of enforcing a limit on the number of results returned per schema type.

OrderAscending
Obsolete.

Search results will be returned in an ascending order.

OrderDescending
Obsolete.

Search results will be returned in a descending order.

ProjectionSchemaTypeWildcard

Schema type to be used in SearchSpec.Builder#addProjection to apply property paths to all results, excepting any types that have had their own, specific property paths set.

RankingStrategyAdvancedRankingExpression
Obsolete.

Ranked by the advanced ranking expression provided.

RankingStrategyCreationTimestamp
Obsolete.

Ranked by document creation timestamps.

RankingStrategyDocumentScore
Obsolete.

Ranked by app-provided document scores.

RankingStrategyJoinAggregateScore
Obsolete.

Ranked by the aggregated ranking signal of the joined documents.

RankingStrategyNone
Obsolete.

No Ranking, results are returned in arbitrary order.

RankingStrategyRelevanceScore
Obsolete.

Ranked by document relevance score.

RankingStrategySystemUsageCount
Obsolete.

Ranked by number of usages from a system UI surface.

RankingStrategySystemUsageLastUsedTimestamp
Obsolete.

Ranked by timestamp of last usage from a system UI surface.

RankingStrategyUsageCount
Obsolete.

Ranked by number of usages, as reported by the app.

RankingStrategyUsageLastUsedTimestamp
Obsolete.

Ranked by timestamp of last usage, as reported by the app.

SchemaTypeWildcard

Schema type to be used in SearchSpec.Builder#addFilterProperties(String, Collection) and SearchSpec.Builder#addProjection to apply property paths to all results, excepting any types that have had their own, specific property paths set.

TermMatchExactOnly
Obsolete.

Query terms will only match exact tokens in the index.

TermMatchPrefix
Obsolete.

Query terms will match indexed tokens when the query term is a prefix of the token.

Properties

AdvancedRankingExpression

Get the advanced ranking expression, or "" if Builder#setRankingStrategy(String) was not called.

Class

Returns the runtime class of this Object.

(Inherited from Object)
Creator
FilterNamespaces

Returns the list of namespaces to search over.

FilterPackageNames

Returns the list of package name filters to search over.

FilterProperties

Returns the map of schema and target properties to search over.

FilterSchemas

Returns the list of schema types to search for.

Handle

The handle to the underlying Android instance.

(Inherited from Object)
IsListFilterHasPropertyFunctionEnabled

Returns whether the LIST_FILTER_HAS_PROPERTY_FUNCTION feature is enabled.

IsListFilterQueryLanguageEnabled

Returns whether the LIST_FILTER_QUERY_LANGUAGE feature is enabled.

IsNumericSearchEnabled

Returns whether the NUMERIC_SEARCH feature is enabled.

IsVerbatimSearchEnabled

Returns whether the VERBATIM_SEARCH feature is enabled.

JniIdentityHashCode (Inherited from Object)
JniPeerMembers
JoinSpec

Returns specification on which documents need to be joined.

MaxSnippetSize

Returns the maximum size of a snippet in characters.

Order

Returns the order of returned search results (descending or ascending).

PeerReference (Inherited from Object)
ProjectionPaths

Returns a map from schema type to property paths to be used for projection.

Projections

Returns a map from schema type to property paths to be used for projection.

PropertyWeightPaths

Returns properties weights to be used for scoring.

PropertyWeights

Returns properties weights to be used for scoring.

RankingStrategy

Returns the ranking strategy.

ResultCountPerPage

Returns the number of results per page in the result set.

ResultGroupingLimit

Get the maximum number of results to return for each group.

ResultGroupingTypeFlags

Get the type of grouping limit to apply, or 0 if Builder#setResultGrouping was not called.

SearchSourceLogTag

Gets a tag to indicate the source of this search, or null if Builder#setSearchSourceLogTag(String) was not called.

SnippetCount

Returns how many documents to generate snippets for.

SnippetCountPerProperty

Returns how many matches for each property of a matching document to generate snippets for.

TermMatch

Returns how the query terms should match terms in the index.

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

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
DescribeContents()
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
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)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (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)
WriteToParcel(Parcel, ParcelableWriteFlags)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to