Loading apex/appsearch/framework/java/android/app/appsearch/AppSearchSchema.java +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ import java.util.Set; * <p>For example, an e-mail message or a music recording could be a schema type. * * <p>The schema consists of type information, properties, and config (like tokenization type). * * @see AppSearchSession#setSchema * @hide */ public final class AppSearchSchema { Loading apex/appsearch/framework/java/android/app/appsearch/GenericDocument.java +36 −10 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ import java.util.Set; * Represents a document unit. * * <p>Documents are constructed via {@link GenericDocument.Builder}. * * @see AppSearchSession#putDocuments * @see AppSearchSession#getByUri * @see AppSearchSession#query * @hide */ public class GenericDocument { Loading Loading @@ -157,7 +161,11 @@ public class GenericDocument { return mSchemaType; } /** Returns the creation timestamp of the {@link GenericDocument}, in milliseconds. */ /** * Returns the creation timestamp of the {@link GenericDocument}, in milliseconds. * * <p>The value is in the {@link System#currentTimeMillis} time base. */ public long getCreationTimestampMillis() { return mCreationTimestampMillis; } Loading @@ -165,6 +173,10 @@ public class GenericDocument { /** * Returns the TTL (Time To Live) of the {@link GenericDocument}, in milliseconds. * * <p>The TTL is measured against {@link #getCreationTimestampMillis}. At the timestamp of * {@code creationTimestampMillis + ttlMillis}, measured in the {@link System#currentTimeMillis} * time base, the document will be auto-deleted. * * <p>The default value is 0, which means the document is permanent and won't be auto-deleted * until the app is uninstalled. */ Loading @@ -175,10 +187,13 @@ public class GenericDocument { /** * Returns the score of the {@link GenericDocument}. * * <p>The score is a query-independent measure of the document's quality, relative to other * {@link GenericDocument}s of the same type. * <p>The score is a query-independent measure of the document's quality, relative to * other {@link GenericDocument}s of the same type. * * <p>Results may be sorted by score using {@link SearchSpec.Builder#setRankingStrategy}. * Documents with higher scores are considered better than documents with lower scores. * * <p>The default value is 0. * <p>Any nonnegative integer can be used a score. */ public int getScore() { return mBundle.getInt(SCORE_FIELD, DEFAULT_SCORE); Loading Loading @@ -448,8 +463,8 @@ public class GenericDocument { } /** * Deeply checks two bundles are equally or not. * <p> Two bundles will be considered equally if they contain same content. * Deeply checks whether two bundles are equal. * <p>Two bundles will be considered equal if they contain the same content. */ @SuppressWarnings("unchecked") private static boolean bundleEquals(Bundle one, Bundle two) { Loading Loading @@ -704,6 +719,11 @@ public class GenericDocument { * <p>The score is a query-independent measure of the document's quality, relative to * other {@link GenericDocument}s of the same type. * * <p>Results may be sorted by score using {@link SearchSpec.Builder#setRankingStrategy}. * Documents with higher scores are considered better than documents with lower scores. * * <p>Any nonnegative integer can be used a score. * * @throws IllegalArgumentException If the provided value is negative. */ @NonNull Loading @@ -717,8 +737,10 @@ public class GenericDocument { } /** * Sets the creation timestamp of the {@link GenericDocument}, in milliseconds. Should be * set using a value obtained from the {@link System#currentTimeMillis()} time base. * Sets the creation timestamp of the {@link GenericDocument}, in milliseconds. * * <p>Should be set using a value obtained from the {@link System#currentTimeMillis} time * base. */ @NonNull public BuilderType setCreationTimestampMillis(long creationTimestampMillis) { Loading @@ -731,8 +753,12 @@ public class GenericDocument { /** * Sets the TTL (Time To Live) of the {@link GenericDocument}, in milliseconds. * * <p>After this many milliseconds since the {@link #setCreationTimestampMillis creation * timestamp}, the document is deleted. * <p>The TTL is measured against {@link #getCreationTimestampMillis}. At the timestamp of * {@code creationTimestampMillis + ttlMillis}, measured in the * {@link System#currentTimeMillis} time base, the document will be auto-deleted. * * <p>The default value is 0, which means the document is permanent and won't be * auto-deleted until the app is uninstalled. * * @param ttlMillis A non-negative duration in milliseconds. * @throws IllegalArgumentException If the provided value is negative. Loading apex/appsearch/framework/java/android/app/appsearch/GetByUriRequest.java +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.Set; /** * Encapsulates a request to retrieve documents by namespace and URI. * * @see AppSearchManager#getByUri * @see AppSearchSession#getByUri * @hide */ public final class GetByUriRequest { Loading apex/appsearch/framework/java/android/app/appsearch/PutDocumentsRequest.java +2 −2 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ import java.util.Collections; import java.util.List; /** * Encapsulates a request to index a document into an {@link AppSearchManager} database. * Encapsulates a request to index a document into an {@link AppSearchSession} database. * * @see AppSearchManager#putDocuments * @see AppSearchSession#putDocuments * @hide */ public final class PutDocumentsRequest { Loading apex/appsearch/framework/java/android/app/appsearch/RemoveByUriRequest.java +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.Set; /** * Encapsulates a request to remove documents by namespace and URI. * * @see AppSearchManager#removeByUri * @see AppSearchSession#removeByUri * @hide */ public final class RemoveByUriRequest { Loading Loading
apex/appsearch/framework/java/android/app/appsearch/AppSearchSchema.java +2 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ import java.util.Set; * <p>For example, an e-mail message or a music recording could be a schema type. * * <p>The schema consists of type information, properties, and config (like tokenization type). * * @see AppSearchSession#setSchema * @hide */ public final class AppSearchSchema { Loading
apex/appsearch/framework/java/android/app/appsearch/GenericDocument.java +36 −10 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ import java.util.Set; * Represents a document unit. * * <p>Documents are constructed via {@link GenericDocument.Builder}. * * @see AppSearchSession#putDocuments * @see AppSearchSession#getByUri * @see AppSearchSession#query * @hide */ public class GenericDocument { Loading Loading @@ -157,7 +161,11 @@ public class GenericDocument { return mSchemaType; } /** Returns the creation timestamp of the {@link GenericDocument}, in milliseconds. */ /** * Returns the creation timestamp of the {@link GenericDocument}, in milliseconds. * * <p>The value is in the {@link System#currentTimeMillis} time base. */ public long getCreationTimestampMillis() { return mCreationTimestampMillis; } Loading @@ -165,6 +173,10 @@ public class GenericDocument { /** * Returns the TTL (Time To Live) of the {@link GenericDocument}, in milliseconds. * * <p>The TTL is measured against {@link #getCreationTimestampMillis}. At the timestamp of * {@code creationTimestampMillis + ttlMillis}, measured in the {@link System#currentTimeMillis} * time base, the document will be auto-deleted. * * <p>The default value is 0, which means the document is permanent and won't be auto-deleted * until the app is uninstalled. */ Loading @@ -175,10 +187,13 @@ public class GenericDocument { /** * Returns the score of the {@link GenericDocument}. * * <p>The score is a query-independent measure of the document's quality, relative to other * {@link GenericDocument}s of the same type. * <p>The score is a query-independent measure of the document's quality, relative to * other {@link GenericDocument}s of the same type. * * <p>Results may be sorted by score using {@link SearchSpec.Builder#setRankingStrategy}. * Documents with higher scores are considered better than documents with lower scores. * * <p>The default value is 0. * <p>Any nonnegative integer can be used a score. */ public int getScore() { return mBundle.getInt(SCORE_FIELD, DEFAULT_SCORE); Loading Loading @@ -448,8 +463,8 @@ public class GenericDocument { } /** * Deeply checks two bundles are equally or not. * <p> Two bundles will be considered equally if they contain same content. * Deeply checks whether two bundles are equal. * <p>Two bundles will be considered equal if they contain the same content. */ @SuppressWarnings("unchecked") private static boolean bundleEquals(Bundle one, Bundle two) { Loading Loading @@ -704,6 +719,11 @@ public class GenericDocument { * <p>The score is a query-independent measure of the document's quality, relative to * other {@link GenericDocument}s of the same type. * * <p>Results may be sorted by score using {@link SearchSpec.Builder#setRankingStrategy}. * Documents with higher scores are considered better than documents with lower scores. * * <p>Any nonnegative integer can be used a score. * * @throws IllegalArgumentException If the provided value is negative. */ @NonNull Loading @@ -717,8 +737,10 @@ public class GenericDocument { } /** * Sets the creation timestamp of the {@link GenericDocument}, in milliseconds. Should be * set using a value obtained from the {@link System#currentTimeMillis()} time base. * Sets the creation timestamp of the {@link GenericDocument}, in milliseconds. * * <p>Should be set using a value obtained from the {@link System#currentTimeMillis} time * base. */ @NonNull public BuilderType setCreationTimestampMillis(long creationTimestampMillis) { Loading @@ -731,8 +753,12 @@ public class GenericDocument { /** * Sets the TTL (Time To Live) of the {@link GenericDocument}, in milliseconds. * * <p>After this many milliseconds since the {@link #setCreationTimestampMillis creation * timestamp}, the document is deleted. * <p>The TTL is measured against {@link #getCreationTimestampMillis}. At the timestamp of * {@code creationTimestampMillis + ttlMillis}, measured in the * {@link System#currentTimeMillis} time base, the document will be auto-deleted. * * <p>The default value is 0, which means the document is permanent and won't be * auto-deleted until the app is uninstalled. * * @param ttlMillis A non-negative duration in milliseconds. * @throws IllegalArgumentException If the provided value is negative. Loading
apex/appsearch/framework/java/android/app/appsearch/GetByUriRequest.java +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.Set; /** * Encapsulates a request to retrieve documents by namespace and URI. * * @see AppSearchManager#getByUri * @see AppSearchSession#getByUri * @hide */ public final class GetByUriRequest { Loading
apex/appsearch/framework/java/android/app/appsearch/PutDocumentsRequest.java +2 −2 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ import java.util.Collections; import java.util.List; /** * Encapsulates a request to index a document into an {@link AppSearchManager} database. * Encapsulates a request to index a document into an {@link AppSearchSession} database. * * @see AppSearchManager#putDocuments * @see AppSearchSession#putDocuments * @hide */ public final class PutDocumentsRequest { Loading
apex/appsearch/framework/java/android/app/appsearch/RemoveByUriRequest.java +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ import java.util.Set; /** * Encapsulates a request to remove documents by namespace and URI. * * @see AppSearchManager#removeByUri * @see AppSearchSession#removeByUri * @hide */ public final class RemoveByUriRequest { Loading