public class Index<T> extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Index.Attributes |
| Modifier and Type | Method | Description |
|---|---|---|
default CreateUpdateKey |
addApiKey(ApiKey key) |
Add a key to this index
|
default CreateUpdateKey |
addApiKey(ApiKey key,
RequestOptions requestOptions) |
Add a key to this index
|
default CreateUpdateKey |
addKey(ApiKey key) |
Deprecated.
|
default TaskIndexing |
addObject(String objectID,
T object) |
Add an object in this index with a unique identifier
|
default TaskIndexing |
addObject(String objectID,
T object,
RequestOptions requestOptions) |
Add an object in this index with a unique identifier
|
default TaskIndexing |
addObject(T object) |
Add an object in this index
|
default TaskIndexing |
addObject(T object,
RequestOptions requestOptions) |
Add an object in this index
|
default TaskSingleIndex |
addObjects(List<T> objects) |
Add several objects
|
default TaskSingleIndex |
addObjects(List<T> objects,
RequestOptions requestOptions) |
Add several objects
|
TaskSingleIndex |
batch(List<BatchOperation> operations) |
Custom batch
|
TaskSingleIndex |
batch(List<BatchOperation> operations,
RequestOptions requestOptions) |
Custom batch
|
default Task |
batchRules(List<Rule> rules) |
Add or replace a list of Rules, no forward to replicas, and no replacement
|
default Task |
batchRules(List<Rule> rules,
boolean forwardToReplicas) |
Add or replace a list of Rules, no replacement
|
default Task |
batchRules(List<Rule> rules,
boolean forwardToReplicas,
boolean clearExistingRules) |
Add or replace a list of query Rules
|
default Task |
batchRules(List<Rule> rules,
boolean forwardToReplicas,
boolean clearExistingRules,
RequestOptions requestOptions) |
Add or replace a list of query Rules
|
default Task |
batchRules(List<Rule> rules,
boolean forwardToReplicas,
RequestOptions requestOptions) |
Add or replace a list of Rules, no replacement
|
default Task |
batchRules(List<Rule> rules,
RequestOptions requestOptions) |
Add or replace a list of Rules, no forward to replicas, and no replacement
|
default Task |
batchSynonyms(List<AbstractSynonym> synonyms) |
Add or Replace a list of synonyms, no forward to slaves, and no replacement
|
default Task |
batchSynonyms(List<AbstractSynonym> synonyms,
boolean forwardToReplicas) |
Add or Replace a list of synonyms, no replacement
|
default Task |
batchSynonyms(List<AbstractSynonym> synonyms,
boolean forwardToReplicas,
boolean replaceExistingSynonyms) |
Add or Replace a list of synonyms
|
default Task |
batchSynonyms(List<AbstractSynonym> synonyms,
boolean forwardToReplicas,
boolean replaceExistingSynonyms,
RequestOptions requestOptions) |
Add or Replace a list of synonyms
|
default Task |
batchSynonyms(List<AbstractSynonym> synonyms,
boolean forwardToReplicas,
RequestOptions requestOptions) |
Add or Replace a list of synonyms, no replacement
|
default Task |
batchSynonyms(List<AbstractSynonym> synonyms,
RequestOptions requestOptions) |
Add or Replace a list of synonyms, no forward to slaves, and no replacement
|
default IndexIterable<T> |
browse(Query query) |
Browse all the content of this index
|
default IndexIterable<T> |
browse(Query query,
RequestOptions requestOptions) |
Browse all the content of this index
|
default IndexIterable<T> |
browseFrom(Query query,
String cursor) |
Browse all the content of this index
|
default IndexIterable<T> |
browseFrom(Query query,
String cursor,
RequestOptions requestOptions) |
Browse all the content of this index
|
default Task |
clear() |
Delete the index content without removing settings and index specific API keys.
|
default Task |
clear(RequestOptions requestOptions) |
Delete the index content without removing settings and index specific API keys.
|
default Task |
clearRules() |
Clear all query Rules and NOT forwarding it to the replicas
|
default Task |
clearRules(boolean forwardToReplicas) |
Clears all Rules
|
default Task |
clearRules(boolean forwardToReplicas,
RequestOptions requestOptions) |
Clears all Rules
|
default Task |
clearRules(RequestOptions requestOptions) |
Clear all query Rules and NOT forwarding it to the replicas
|
default Task |
clearSynonyms() |
Clear all synonyms and NOT forwarding it to the replicas
|
default Task |
clearSynonyms(boolean forwardToReplicas) |
Clears all synonyms
|
default Task |
clearSynonyms(boolean forwardToReplicas,
RequestOptions requestOptions) |
Clears all synonyms
|
default Task |
clearSynonyms(RequestOptions requestOptions) |
Clear all synonyms and NOT forwarding it to the replicas
|
default Task |
copyTo(String dstIndexName) |
Copy an existing index
|
default Task |
copyTo(String dstIndexName,
RequestOptions requestOptions) |
Copy an existing index
|
default Task |
copyTo(String dstIndexName,
List<String> scopes) |
Copy an existing index
|
default Task |
copyTo(String dstIndexName,
List<String> scopes,
RequestOptions requestOptions) |
Copy an existing index
|
default Task |
delete() |
Deletes the index
|
default Task |
delete(RequestOptions requestOptions) |
Deletes the index
|
default DeleteKey |
deleteApiKey(String key) |
Delete a key by name from this index
|
default DeleteKey |
deleteApiKey(String key,
RequestOptions requestOptions) |
Delete a key by name from this index
|
default Task |
deleteBy(Query query) |
Delete records matching a query
|
default Task |
deleteBy(Query query,
RequestOptions requestOptions) |
Delete records matching a query
|
default void |
deleteByQuery(Query query) |
Deprecated.
, use deleteBy
|
default void |
deleteByQuery(Query query,
int batchSize) |
Deprecated.
use deleteBy
|
default void |
deleteByQuery(Query query,
int batchSize,
RequestOptions requestOptions) |
Deprecated.
use deleteBy
|
default void |
deleteByQuery(Query query,
RequestOptions requestOptions) |
Deprecated.
, use deleteBy
|
default DeleteKey |
deleteKey(String key) |
Deprecated.
|
default Task |
deleteObject(String objectID) |
Delete an object from the index
|
default Task |
deleteObject(String objectID,
RequestOptions requestOptions) |
Delete an object from the index
|
default TaskSingleIndex |
deleteObjects(List<String> objectIDs) |
Delete objects from the index
|
default TaskSingleIndex |
deleteObjects(List<String> objectIDs,
RequestOptions requestOptions) |
Delete objects from the index
|
default Task |
deleteRule(String ruleId) |
Deletes a query rule by ID and NOT forwarding it to the replicas
|
default Task |
deleteRule(String ruleId,
boolean forwardToReplicas,
RequestOptions requestOptions) |
Deletes a query rule
|
default Task |
deleteRule(String ruleId,
RequestOptions requestOptions) |
Deletes a query rule by ID and NOT forwarding it to the replicas
|
default Task |
deleteSynonym(String synonymID) |
Deletes a synonym by ID and NOT forwarding it to the replicas
|
default Task |
deleteSynonym(String synonymID,
boolean forwardToReplicas) |
Deletes a synonym
|
default Task |
deleteSynonym(String synonymID,
boolean forwardToReplicas,
RequestOptions requestOptions) |
Deletes a synonym
|
default Task |
deleteSynonym(String synonymID,
RequestOptions requestOptions) |
Deletes a synonym by ID and NOT forwarding it to the replicas
|
APIClient |
getApiClient() |
|
default Optional<ApiKey> |
getApiKey(String key) |
Get a key by name from this index
|
default Optional<ApiKey> |
getApiKey(String key,
RequestOptions requestOptions) |
Get a key by name from this index
|
default Optional<ApiKey> |
getKey(String key) |
Deprecated.
|
Class<T> |
getKlass() |
|
String |
getName() |
|
default Optional<T> |
getObject(String objectID) |
Get an object from this index
|
default Optional<T> |
getObject(String objectID,
RequestOptions requestOptions) |
Get an object from this index
|
default List<T> |
getObjects(List<String> objectIDs) |
Get several objects from this index
|
default List<T> |
getObjects(List<String> objectIDs,
RequestOptions requestOptions) |
Get several objects from this index
|
default List<T> |
getObjects(List<String> objectIDs,
List<String> attributesToRetrieve) |
Get several objects from this index
|
default List<T> |
getObjects(List<String> objectIDs,
List<String> attributesToRetrieve,
RequestOptions requestOptions) |
Get several objects from this index
|
default Optional<Rule> |
getRule(String ruleId) |
Get a rule by Id
|
default Optional<Rule> |
getRule(String ruleId,
RequestOptions requestOptions) |
Get a rule by Id
|
default IndexSettings |
getSettings() |
Get settings of this index
|
default IndexSettings |
getSettings(RequestOptions requestOptions) |
Get settings of this index
|
default Optional<AbstractSynonym> |
getSynonym(String synonymID) |
Get a synonym by ID
|
default Optional<AbstractSynonym> |
getSynonym(String synonymID,
RequestOptions requestOptions) |
Get a synonym by ID
|
default List<ApiKey> |
listApiKeys() |
List keys of this index
|
default List<ApiKey> |
listApiKeys(RequestOptions requestOptions) |
List keys of this index
|
default List<ApiKey> |
listKeys() |
Deprecated.
|
default Task |
moveTo(String dstIndexName) |
Moves an existing index
|
default Task |
moveTo(String dstIndexName,
RequestOptions requestOptions) |
Moves an existing index
|
default TaskSingleIndex |
partialUpdateObject(PartialUpdateOperation operation) |
Partially update an object, create the object if it does not exist
|
default TaskSingleIndex |
partialUpdateObject(PartialUpdateOperation operation,
boolean createIfNotExists) |
Partially update an object
|
default TaskSingleIndex |
partialUpdateObject(PartialUpdateOperation operation,
boolean createIfNotExists,
RequestOptions requestOptions) |
Partially update an object
|
default TaskSingleIndex |
partialUpdateObject(PartialUpdateOperation operation,
RequestOptions requestOptions) |
Partially update an object, create the object if it does not exist
|
default TaskSingleIndex |
partialUpdateObject(String objectID,
Object object) |
Partially update an object
|
default TaskSingleIndex |
partialUpdateObject(String objectID,
Object object,
RequestOptions requestOptions) |
Partially update an object
|
default TaskSingleIndex |
partialUpdateObjects(List<Object> objects) |
Partially update a objects
|
default TaskSingleIndex |
partialUpdateObjects(List<Object> objects,
RequestOptions requestOptions) |
Partially update a objects
|
default Task |
saveObject(String objectID,
T object) |
Override the content of object
|
default Task |
saveObject(String objectID,
T object,
RequestOptions requestOptions) |
Override the content of object
|
default TaskSingleIndex |
saveObjects(List<T> objects) |
Override the content the list of objects
|
default TaskSingleIndex |
saveObjects(List<T> objects,
RequestOptions requestOptions) |
Override the content the list of objects
|
default Task |
saveRule(String queryRuleID,
Rule content) |
Saves/updates a query rule without replacing it and NOT forwarding it to the replicas
|
default Task |
saveRule(String queryRuleID,
Rule content,
boolean forwardToReplicas) |
Saves/updates a queryRule without replacing
|
default Task |
saveRule(String queryRuleID,
Rule content,
boolean forwardToReplicas,
RequestOptions requestOptions) |
Saves/updates a queryRule without replacing
|
default Task |
saveRule(String queryRuleID,
Rule content,
RequestOptions requestOptions) |
Saves/updates a query rule without replacing it and NOT forwarding it to the replicas
|
default Task |
saveSynonym(String synonymID,
AbstractSynonym content) |
Saves/updates a synonym without replacing it and NOT forwarding it to the replicas
|
default Task |
saveSynonym(String synonymID,
AbstractSynonym content,
boolean forwardToReplicas) |
Saves/updates a synonym without replacing
|
default Task |
saveSynonym(String synonymID,
AbstractSynonym content,
boolean forwardToReplicas,
boolean replaceExistingSynonyms) |
Saves/updates a synonym
|
default Task |
saveSynonym(String synonymID,
AbstractSynonym content,
boolean forwardToReplicas,
boolean replaceExistingSynonyms,
RequestOptions requestOptions) |
Saves/updates a synonym
|
default Task |
saveSynonym(String synonymID,
AbstractSynonym content,
boolean forwardToReplicas,
RequestOptions requestOptions) |
Saves/updates a synonym without replacing
|
default Task |
saveSynonym(String synonymID,
AbstractSynonym content,
RequestOptions requestOptions) |
Saves/updates a synonym without replacing it and NOT forwarding it to the slaves
|
SearchResult<T> |
search(Query query) |
Search in the index throws a
AlgoliaIndexNotFoundException if the index does not exists |
SearchResult<T> |
search(Query query,
RequestOptions requestOptions) |
Search in the index throws a
AlgoliaIndexNotFoundException if the index does not exists |
default SearchFacetResult |
searchFacet(String facetName,
String facetQuery) |
Deprecated.
|
default SearchFacetResult |
searchFacet(String facetName,
String facetQuery,
Query query) |
Deprecated.
|
default SearchFacetResult |
searchForFacetValues(String facetName,
String facetQuery) |
Search in a facet throws a
AlgoliaIndexNotFoundException
if the index does not exists |
default SearchFacetResult |
searchForFacetValues(String facetName,
String facetQuery,
Query query) |
Search in a facet throws a
AlgoliaIndexNotFoundException
if the index does not exists |
default SearchFacetResult |
searchForFacetValues(String facetName,
String facetQuery,
Query query,
RequestOptions requestOptions) |
Search in a facet throws a
AlgoliaIndexNotFoundException
if the index does not exists |
default SearchFacetResult |
searchForFacetValues(String facetName,
String facetQuery,
RequestOptions requestOptions) |
Search in a facet throws a
AlgoliaIndexNotFoundException
if the index does not exists |
default SearchFacetResult |
searchInFacetValues(String facetName,
String facetQuery) |
Deprecated.
|
default SearchFacetResult |
searchInFacetValues(String facetName,
String facetQuery,
Query query) |
Deprecated.
|
default SearchRuleResult |
searchRules(RuleQuery query) |
Search for Rules
|
default SearchRuleResult |
searchRules(RuleQuery query,
RequestOptions requestOptions) |
Search for Rules
|
default SearchSynonymResult |
searchSynonyms(SynonymQuery query) |
Search for synonyms
|
default SearchSynonymResult |
searchSynonyms(SynonymQuery query,
RequestOptions requestOptions) |
Search for synonyms
|
default Task |
setSettings(IndexSettings settings) |
Set settings of this index, and do not forward to replicas
|
default Task |
setSettings(IndexSettings settings,
RequestOptions requestOptions) |
Set settings of this index, and do not forward to slaves
|
default Task |
setSettings(IndexSettings settings,
Boolean forwardToReplicas) |
Set settings of this index
|
default Task |
setSettings(IndexSettings settings,
Boolean forwardToReplicas,
RequestOptions requestOptions) |
Set settings of this index
|
String |
toString() |
|
default CreateUpdateKey |
updateKey(String keyName,
ApiKey key) |
Update a key by name from this index
|
default CreateUpdateKey |
updateKey(String keyName,
ApiKey key,
RequestOptions requestOptions) |
Update a key by name from this index
|
default void |
waitTask(Task task) |
Wait for the completion of a task, for 100ms
|
default void |
waitTask(Task task,
long timeToWait) |
Wait for the completion of a task
|
default void |
waitTask(Task task,
long timeToWait,
RequestOptions requestOptions) |
Wait for the completion of a task
|
default void |
waitTask(Task task,
RequestOptions requestOptions) |
Wait for the completion of a task, for 100ms
|
public String getName()
public APIClient getApiClient()
public SearchResult<T> search(@Nonnull Query query) throws AlgoliaException
AlgoliaIndexNotFoundException if the index does not existsquery - the queryAlgoliaExceptionpublic SearchResult<T> search(@Nonnull Query query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
AlgoliaIndexNotFoundException if the index does not existsquery - the queryAlgoliaExceptionpublic TaskSingleIndex batch(@Nonnull List<BatchOperation> operations) throws AlgoliaException
All operations must have index name set to null
operations - the list of operations to perform on this indexAlgoliaException subclassespublic TaskSingleIndex batch(@Nonnull List<BatchOperation> operations, @Nonnull RequestOptions requestOptions) throws AlgoliaException
All operations must have index name set to null
operations - the list of operations to perform on this indexrequestOptions - Options to pass to this requestAlgoliaException subclasses@Deprecated public default void deleteByQuery(@Nonnull Query query) throws AlgoliaException
query - The queryAlgoliaExceptionpublic default Task deleteBy(@Nonnull Query query) throws AlgoliaException
query - The queryAlgoliaException@Deprecated public default void deleteByQuery(@Nonnull Query query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - The queryrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task deleteBy(@Nonnull Query query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - The queryrequestOptions - Options to pass to this requestAlgoliaException@Deprecated public default void deleteByQuery(@Nonnull Query query, int batchSize) throws AlgoliaException
query - The querybatchSize - the size of the batchesAlgoliaException@Deprecated public default void deleteByQuery(@Nonnull Query query, int batchSize, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - The querybatchSize - the size of the batchesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default IndexIterable<T> browse(@Nonnull Query query) throws AlgoliaException
query - The query to use to browseAlgoliaExceptionpublic default IndexIterable<T> browse(@Nonnull Query query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - The query to use to browserequestOptions - Options to pass to this requestAlgoliaExceptionpublic default IndexIterable<T> browseFrom(@Nonnull Query query, @Nullable String cursor) throws AlgoliaException
query - The query to use to browsecursor - the cursor to start fromAlgoliaExceptionpublic default IndexIterable<T> browseFrom(@Nonnull Query query, @Nullable String cursor, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - The query to use to browsecursor - the cursor to start fromrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task saveSynonym(@Nonnull String synonymID, @Nonnull AbstractSynonym content) throws AlgoliaException
synonymID - the id of the synonymcontent - the synonymAlgoliaExceptionpublic default Task saveSynonym(@Nonnull String synonymID, @Nonnull AbstractSynonym content, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonymID - the id of the synonymcontent - the synonymrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task saveSynonym(@Nonnull String synonymID, @Nonnull AbstractSynonym content, boolean forwardToReplicas) throws AlgoliaException
synonymID - the id of the synonymcontent - the synonymforwardToReplicas - should this request be forwarded to replicasAlgoliaExceptionpublic default Task saveSynonym(@Nonnull String synonymID, @Nonnull AbstractSynonym content, boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonymID - the id of the synonymcontent - the synonymforwardToReplicas - should this request be forwarded to slavesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task saveSynonym(@Nonnull String synonymID, @Nonnull AbstractSynonym content, boolean forwardToReplicas, boolean replaceExistingSynonyms) throws AlgoliaException
synonymID - the id of the synonymcontent - the synonymforwardToReplicas - should this request be forwarded to replicasreplaceExistingSynonyms - should replace if this synonyms existsAlgoliaExceptionpublic default Task saveSynonym(@Nonnull String synonymID, @Nonnull AbstractSynonym content, boolean forwardToReplicas, boolean replaceExistingSynonyms, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonymID - the id of the synonymcontent - the synonymforwardToReplicas - should this request be forwarded to slavesreplaceExistingSynonyms - should replace if this synonyms existsrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Optional<AbstractSynonym> getSynonym(@Nonnull String synonymID) throws AlgoliaException
synonymID - the id of the synonymAlgoliaExceptionpublic default Optional<AbstractSynonym> getSynonym(@Nonnull String synonymID, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonymID - the id of the synonymrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task deleteSynonym(@Nonnull String synonymID) throws AlgoliaException
synonymID - the id of the synonymAlgoliaExceptionpublic default Task deleteSynonym(@Nonnull String synonymID, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonymID - the id of the synonymrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task deleteSynonym(@Nonnull String synonymID, boolean forwardToReplicas) throws AlgoliaException
synonymID - the id of the synonymforwardToReplicas - should this request be forwarded to replicasAlgoliaExceptionpublic default Task deleteSynonym(@Nonnull String synonymID, boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonymID - the id of the synonymforwardToReplicas - should this request be forwarded to replicasrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task clearSynonyms() throws AlgoliaException
AlgoliaExceptionpublic default Task clearSynonyms(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task clearSynonyms(boolean forwardToReplicas) throws AlgoliaException
forwardToReplicas - should this request be forwarded to replicasAlgoliaExceptionpublic default Task clearSynonyms(boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
forwardToReplicas - should this request be forwarded to replicasrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default SearchSynonymResult searchSynonyms(@Nonnull SynonymQuery query) throws AlgoliaException
query - the queryAlgoliaExceptionpublic default SearchSynonymResult searchSynonyms(@Nonnull SynonymQuery query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - the queryrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task batchSynonyms(@Nonnull List<AbstractSynonym> synonyms, boolean forwardToReplicas, boolean replaceExistingSynonyms) throws AlgoliaException
synonyms - List of synonymsforwardToReplicas - Forward the operation to the slave indicesreplaceExistingSynonyms - Replace the existing synonyms with this batchAlgoliaExceptionpublic default Task batchSynonyms(@Nonnull List<AbstractSynonym> synonyms, boolean forwardToReplicas, boolean replaceExistingSynonyms, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonyms - List of synonymsforwardToReplicas - Forward the operation to the slave indicesreplaceExistingSynonyms - Replace the existing synonyms with this batchrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task batchSynonyms(@Nonnull List<AbstractSynonym> synonyms, boolean forwardToReplicas) throws AlgoliaException
synonyms - List of synonymsforwardToReplicas - Forward the operation to the slave indicesAlgoliaExceptionpublic default Task batchSynonyms(@Nonnull List<AbstractSynonym> synonyms, boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonyms - List of synonymsforwardToReplicas - Forward the operation to the slave indicesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task batchSynonyms(@Nonnull List<AbstractSynonym> synonyms) throws AlgoliaException
synonyms - List of synonymsAlgoliaExceptionpublic default Task batchSynonyms(@Nonnull List<AbstractSynonym> synonyms, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonyms - List of synonymsrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default TaskSingleIndex partialUpdateObject(@Nonnull String objectID, @Nonnull Object object) throws AlgoliaException
objectID - the ID of object to updateobject - the object to updateAlgoliaException subclassespublic default TaskSingleIndex partialUpdateObject(@Nonnull String objectID, @Nonnull Object object, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objectID - the ID of object to updateobject - the object to updaterequestOptions - Options to pass to this requestAlgoliaException subclassespublic default TaskSingleIndex partialUpdateObjects(@Nonnull List<Object> objects) throws AlgoliaException
objects - the list of objects to update (with an objectID)AlgoliaExceptionpublic default TaskSingleIndex partialUpdateObjects(@Nonnull List<Object> objects, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objects - the list of objects to update (with an objectID)requestOptions - Options to pass to this requestAlgoliaExceptionpublic default TaskSingleIndex partialUpdateObject(@Nonnull PartialUpdateOperation operation) throws AlgoliaException
operation - the operation to perform on this objectAlgoliaException subclassespublic default TaskSingleIndex partialUpdateObject(@Nonnull PartialUpdateOperation operation, @Nonnull RequestOptions requestOptions) throws AlgoliaException
operation - the operation to perform on this objectrequestOptions - Options to pass to this requestAlgoliaException subclassespublic default TaskSingleIndex partialUpdateObject(@Nonnull PartialUpdateOperation operation, boolean createIfNotExists) throws AlgoliaException
operation - the operation to perform on this objectcreateIfNotExists - should the object be created or notAlgoliaException subclassespublic default TaskSingleIndex partialUpdateObject(@Nonnull PartialUpdateOperation operation, boolean createIfNotExists, @Nonnull RequestOptions requestOptions) throws AlgoliaException
operation - the operation to perform on this objectcreateIfNotExists - should the object be created or notrequestOptions - Options to pass to this requestAlgoliaException subclassespublic default SearchFacetResult searchForFacetValues(@Nonnull String facetName, @Nonnull String facetQuery, Query query) throws AlgoliaException
AlgoliaIndexNotFoundException
if the index does not existsfacetName - The name of the facet to search infacetQuery - The search query for this facetquery - the query (not required)AlgoliaExceptionpublic default SearchFacetResult searchForFacetValues(@Nonnull String facetName, @Nonnull String facetQuery, Query query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
AlgoliaIndexNotFoundException
if the index does not existsfacetName - The name of the facet to search infacetQuery - The search query for this facetquery - the query (not required)requestOptions - Options to pass to this requestAlgoliaExceptionpublic default SearchFacetResult searchForFacetValues(@Nonnull String facetName, @Nonnull String facetQuery) throws AlgoliaException
AlgoliaIndexNotFoundException
if the index does not existsfacetName - The name of the facet to search infacetQuery - The search query for this facetAlgoliaExceptionpublic default SearchFacetResult searchForFacetValues(@Nonnull String facetName, @Nonnull String facetQuery, @Nonnull RequestOptions requestOptions) throws AlgoliaException
AlgoliaIndexNotFoundException
if the index does not existsfacetName - The name of the facet to search infacetQuery - The search query for this facetrequestOptions - Options to pass to this requestAlgoliaException@Deprecated public default SearchFacetResult searchInFacetValues(@Nonnull String facetName, @Nonnull String facetQuery, Query query) throws AlgoliaException
AlgoliaException@Deprecated public default SearchFacetResult searchInFacetValues(@Nonnull String facetName, @Nonnull String facetQuery) throws AlgoliaException
AlgoliaException@Deprecated public default SearchFacetResult searchFacet(@Nonnull String facetName, @Nonnull String facetQuery, Query query) throws AlgoliaException
AlgoliaException@Deprecated public default SearchFacetResult searchFacet(@Nonnull String facetName, @Nonnull String facetQuery) throws AlgoliaException
AlgoliaException@Deprecated public default List<ApiKey> listKeys() throws AlgoliaException
AlgoliaExceptionpublic default List<ApiKey> listApiKeys() throws AlgoliaException
AlgoliaExceptionpublic default List<ApiKey> listApiKeys(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaException@Deprecated public default Optional<ApiKey> getKey(@Nonnull String key) throws AlgoliaException
AlgoliaExceptionpublic default Optional<ApiKey> getApiKey(@Nonnull String key) throws AlgoliaException
key - the key nameAlgoliaExceptionpublic default Optional<ApiKey> getApiKey(@Nonnull String key, @Nonnull RequestOptions requestOptions) throws AlgoliaException
key - the key namerequestOptions - Options to pass to this requestAlgoliaException@Deprecated public default DeleteKey deleteKey(@Nonnull String key) throws AlgoliaException
AlgoliaExceptionpublic default DeleteKey deleteApiKey(@Nonnull String key) throws AlgoliaException
key - the key nameAlgoliaExceptionpublic default DeleteKey deleteApiKey(@Nonnull String key, @Nonnull RequestOptions requestOptions) throws AlgoliaException
key - the key namerequestOptions - Options to pass to this requestAlgoliaException@Deprecated public default CreateUpdateKey addKey(@Nonnull ApiKey key) throws AlgoliaException
AlgoliaExceptionpublic default CreateUpdateKey addApiKey(@Nonnull ApiKey key) throws AlgoliaException
key - the keyAlgoliaExceptionpublic default CreateUpdateKey addApiKey(@Nonnull ApiKey key, @Nonnull RequestOptions requestOptions) throws AlgoliaException
key - the keyrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default CreateUpdateKey updateKey(@Nonnull String keyName, @Nonnull ApiKey key) throws AlgoliaException
keyName - the key namekey - the key to updateAlgoliaExceptionpublic default CreateUpdateKey updateKey(@Nonnull String keyName, @Nonnull ApiKey key, @Nonnull RequestOptions requestOptions) throws AlgoliaException
keyName - the key namekey - the key to updaterequestOptions - Options to pass to this requestAlgoliaExceptionpublic default IndexSettings getSettings() throws AlgoliaException
AlgoliaExceptionpublic default IndexSettings getSettings(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task setSettings(@Nonnull IndexSettings settings) throws AlgoliaException
settings - the settings to setAlgoliaExceptionpublic default Task setSettings(@Nonnull IndexSettings settings, @Nonnull RequestOptions requestOptions) throws AlgoliaException
settings - the settings to setrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task setSettings(@Nonnull IndexSettings settings, @Nonnull Boolean forwardToReplicas) throws AlgoliaException
settings - the settings to setforwardToReplicas - should these updates be forwarded to the replicasAlgoliaExceptionpublic default Task setSettings(@Nonnull IndexSettings settings, @Nonnull Boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
settings - the settings to setforwardToReplicas - should these updates be forwarded to the slavesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default TaskIndexing addObject(@Nonnull T object) throws AlgoliaException
object - object to addAlgoliaExceptionpublic default TaskIndexing addObject(@Nonnull T object, @Nonnull RequestOptions requestOptions) throws AlgoliaException
object - object to addrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default TaskIndexing addObject(@Nonnull String objectID, @Nonnull T object) throws AlgoliaException
objectID - the objectID associated to this object (if this objectID already exist the old
object will be overridden)object - object to addAlgoliaExceptionpublic default TaskIndexing addObject(@Nonnull String objectID, @Nonnull T object, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objectID - the objectID associated to this object (if this objectID already exist the old
object will be overridden)object - object to addrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default TaskSingleIndex addObjects(@Nonnull List<T> objects) throws AlgoliaException
objects - objects to addAlgoliaExceptionpublic default TaskSingleIndex addObjects(@Nonnull List<T> objects, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objects - objects to addrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Optional<T> getObject(@Nonnull String objectID) throws AlgoliaException
objectID - the unique identifier of the object to retrieveAlgoliaExceptionpublic default Optional<T> getObject(@Nonnull String objectID, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objectID - the unique identifier of the object to retrieverequestOptions - Options to pass to this requestAlgoliaExceptionpublic default List<T> getObjects(@Nonnull List<String> objectIDs) throws AlgoliaException
objectIDs - the list of unique identifier of objects to retrieveAlgoliaExceptionpublic default List<T> getObjects(@Nonnull List<String> objectIDs, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objectIDs - the list of unique identifier of objects to retrieverequestOptions - Options to pass to this requestAlgoliaExceptionpublic default List<T> getObjects(@Nonnull List<String> objectIDs, @Nonnull List<String> attributesToRetrieve) throws AlgoliaException
objectIDs - the list of unique identifier of objects to retrieveattributesToRetrieve - the list of attributes to retrieve for these objectsAlgoliaExceptionpublic default List<T> getObjects(@Nonnull List<String> objectIDs, @Nonnull List<String> attributesToRetrieve, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objectIDs - the list of unique identifier of objects to retrieveattributesToRetrieve - the list of attributes to retrieve for these objectsrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task saveObject(@Nonnull String objectID, @Nonnull T object) throws AlgoliaException
objectID - the unique identifier of the object to retrieveobject - the object to updateAlgoliaExceptionpublic default Task saveObject(@Nonnull String objectID, @Nonnull T object, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objectID - the unique identifier of the object to retrieveobject - the object to updaterequestOptions - Options to pass to this requestAlgoliaExceptionpublic default TaskSingleIndex saveObjects(@Nonnull List<T> objects) throws AlgoliaException
objects - the list objects to updateAlgoliaExceptionpublic default TaskSingleIndex saveObjects(@Nonnull List<T> objects, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objects - the list objects to updaterequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task deleteObject(@Nonnull String objectID) throws AlgoliaException
objectID - the unique identifier of the object to retrieveAlgoliaExceptionpublic default Task deleteObject(@Nonnull String objectID, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objectID - the unique identifier of the object to retrieverequestOptions - Options to pass to this requestAlgoliaExceptionpublic default TaskSingleIndex deleteObjects(@Nonnull List<String> objectIDs) throws AlgoliaException
objectIDs - the list of unique identifier of the object to retrieveAlgoliaExceptionpublic default TaskSingleIndex deleteObjects(@Nonnull List<String> objectIDs, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objectIDs - the list of unique identifier of the object to retrieverequestOptions - Options to pass to this requestAlgoliaExceptionpublic default void waitTask(@Nonnull Task task, long timeToWait) throws AlgoliaException
task - task to wait fortimeToWait - the time to wait in millisecondsAlgoliaExceptionpublic default void waitTask(@Nonnull Task task, long timeToWait, @Nonnull RequestOptions requestOptions) throws AlgoliaException
task - task to wait fortimeToWait - the time to wait in millisecondsrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default void waitTask(@Nonnull Task task) throws AlgoliaException
task - task to wait forAlgoliaExceptionpublic default void waitTask(@Nonnull Task task, @Nonnull RequestOptions requestOptions) throws AlgoliaException
task - task to wait forrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task delete() throws AlgoliaException
AlgoliaExceptionpublic default Task delete(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task clear() throws AlgoliaException
AlgoliaExceptionpublic default Task clear(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task moveTo(@Nonnull String dstIndexName) throws AlgoliaException
dstIndexName - the new index name that will contains a copy of srcIndexName (destination
will be overriten if it already exist)AlgoliaExceptionpublic default Task moveTo(@Nonnull String dstIndexName, @Nonnull RequestOptions requestOptions) throws AlgoliaException
dstIndexName - the new index name that will contains a copy of srcIndexName (destination
will be overriten if it already exist)requestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task copyTo(@Nonnull String dstIndexName) throws AlgoliaException
dstIndexName - the new index name that will contains a copy of srcIndexName (destination
will be overridden if it already exist)AlgoliaExceptionpublic default Task copyTo(@Nonnull String dstIndexName, @Nonnull RequestOptions requestOptions) throws AlgoliaException
dstIndexName - the new index name that will contains a copy of srcIndexName (destination
will be overridden if it already exist)requestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task copyTo(@Nonnull String dstIndexName, @Nonnull List<String> scopes, @Nonnull RequestOptions requestOptions) throws AlgoliaException
dstIndexName - the new index name that will contains a copy of srcIndexName (destination
will be overridden if it already exist)scopes - the list of scopes to copyrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task copyTo(@Nonnull String dstIndexName, @Nonnull List<String> scopes) throws AlgoliaException
dstIndexName - the new index name that will contains a copy of srcIndexName (destination
will be overridden if it already exist)scopes - the list of scopes to copyAlgoliaExceptionpublic default Task saveRule(@Nonnull String queryRuleID, @Nonnull Rule content) throws AlgoliaException
queryRuleID - the id of the queryRulecontent - the queryRuleAlgoliaExceptionpublic default Task saveRule(@Nonnull String queryRuleID, @Nonnull Rule content, @Nonnull RequestOptions requestOptions) throws AlgoliaException
queryRuleID - the id of the queryRulecontent - the queryRulerequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task saveRule(@Nonnull String queryRuleID, @Nonnull Rule content, boolean forwardToReplicas) throws AlgoliaException
queryRuleID - the id of the queryRulecontent - the queryRuleforwardToReplicas - should this request be forwarded to replicasAlgoliaExceptionpublic default Task saveRule(@Nonnull String queryRuleID, @Nonnull Rule content, boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
queryRuleID - the id of the queryRulecontent - the queryRuleforwardToReplicas - should this request be forwarded to replicasrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Optional<Rule> getRule(@Nonnull String ruleId) throws AlgoliaException
ruleId - the id of the query ruleAlgoliaExceptionpublic default Optional<Rule> getRule(@Nonnull String ruleId, @Nonnull RequestOptions requestOptions) throws AlgoliaException
ruleId - the id of the query rulerequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task deleteRule(@Nonnull String ruleId) throws AlgoliaException
ruleId - the id of the queryRuleAlgoliaExceptionpublic default Task deleteRule(@Nonnull String ruleId, @Nonnull RequestOptions requestOptions) throws AlgoliaException
ruleId - the id of the queryRulerequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task deleteRule(@Nonnull String ruleId, boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
ruleId - the id of the query ruleforwardToReplicas - should this request be forwarded to replicasrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task clearRules() throws AlgoliaException
AlgoliaExceptionpublic default Task clearRules(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task clearRules(boolean forwardToReplicas) throws AlgoliaException
AlgoliaExceptionpublic default Task clearRules(boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
forwardToReplicas - should this request be forwarded to replicasrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default SearchRuleResult searchRules(@Nonnull RuleQuery query) throws AlgoliaException
query - the queryAlgoliaExceptionpublic default SearchRuleResult searchRules(@Nonnull RuleQuery query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - the queryrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task batchRules(@Nonnull List<Rule> rules, boolean forwardToReplicas, boolean clearExistingRules) throws AlgoliaException
rules - List of query RulesforwardToReplicas - Forward the operation to the slave indicesclearExistingRules - Replace the existing query Rules with this batchAlgoliaExceptionpublic default Task batchRules(@Nonnull List<Rule> rules, boolean forwardToReplicas, boolean clearExistingRules, @Nonnull RequestOptions requestOptions) throws AlgoliaException
rules - List of query RulesforwardToReplicas - Forward the operation to the slave indicesclearExistingRules - Replace the existing query Rules with this batchrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task batchRules(@Nonnull List<Rule> rules, boolean forwardToReplicas) throws AlgoliaException
rules - List of RulesforwardToReplicas - Forward the operation to the slave indicesAlgoliaExceptionpublic default Task batchRules(@Nonnull List<Rule> rules, boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
rules - List of RulesforwardToReplicas - Forward the operation to the slave indicesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic default Task batchRules(@Nonnull List<Rule> rules) throws AlgoliaException
rules - List of RulesAlgoliaExceptionpublic default Task batchRules(@Nonnull List<Rule> rules, @Nonnull RequestOptions requestOptions) throws AlgoliaException
rules - List of RulesrequestOptions - Options to pass to this requestAlgoliaExceptionCopyright © 2017. All rights reserved.