public class Index<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Index.Attributes |
| Modifier and Type | Method and 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 |
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.
|
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.
|
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,
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 List<T> |
getObjects(List<String> objectIDs,
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,
Boolean forwardToReplicas)
Set settings of this index
|
default Task |
setSettings(IndexSettings settings,
Boolean forwardToReplicas,
RequestOptions requestOptions)
Set settings of this index
|
default Task |
setSettings(IndexSettings settings,
RequestOptions requestOptions)
Set settings of this index, and do not forward to slaves
|
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 void deleteByQuery(@Nonnull Query query) throws AlgoliaException
query - The queryAlgoliaExceptionpublic Task deleteBy(@Nonnull Query query) throws AlgoliaException
query - The queryAlgoliaException@Deprecated public void deleteByQuery(@Nonnull Query query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - The queryrequestOptions - Options to pass to this requestAlgoliaExceptionpublic Task deleteBy(@Nonnull Query query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - The queryrequestOptions - Options to pass to this requestAlgoliaException@Deprecated public void deleteByQuery(@Nonnull Query query, int batchSize) throws AlgoliaException
query - The querybatchSize - the size of the batchesAlgoliaException@Deprecated public 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 IndexIterable<T> browse(@Nonnull Query query) throws AlgoliaException
query - The query to use to browseAlgoliaExceptionpublic IndexIterable<T> browse(@Nonnull Query query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - The query to use to browserequestOptions - Options to pass to this requestAlgoliaExceptionpublic IndexIterable<T> browseFrom(@Nonnull Query query, @Nullable String cursor) throws AlgoliaException
query - The query to use to browsecursor - the cursor to start fromAlgoliaExceptionpublic 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 Task saveSynonym(@Nonnull String synonymID, @Nonnull AbstractSynonym content) throws AlgoliaException
synonymID - the id of the synonymcontent - the synonymAlgoliaExceptionpublic 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 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 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 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 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 Optional<AbstractSynonym> getSynonym(@Nonnull String synonymID) throws AlgoliaException
synonymID - the id of the synonymAlgoliaExceptionpublic Optional<AbstractSynonym> getSynonym(@Nonnull String synonymID, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonymID - the id of the synonymrequestOptions - Options to pass to this requestAlgoliaExceptionpublic Task deleteSynonym(@Nonnull String synonymID) throws AlgoliaException
synonymID - the id of the synonymAlgoliaExceptionpublic Task deleteSynonym(@Nonnull String synonymID, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonymID - the id of the synonymrequestOptions - Options to pass to this requestAlgoliaExceptionpublic Task deleteSynonym(@Nonnull String synonymID, boolean forwardToReplicas) throws AlgoliaException
synonymID - the id of the synonymforwardToReplicas - should this request be forwarded to replicasAlgoliaExceptionpublic 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 Task clearSynonyms() throws AlgoliaException
AlgoliaExceptionpublic Task clearSynonyms(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic Task clearSynonyms(boolean forwardToReplicas) throws AlgoliaException
forwardToReplicas - should this request be forwarded to replicasAlgoliaExceptionpublic Task clearSynonyms(boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
forwardToReplicas - should this request be forwarded to replicasrequestOptions - Options to pass to this requestAlgoliaExceptionpublic SearchSynonymResult searchSynonyms(@Nonnull SynonymQuery query) throws AlgoliaException
query - the queryAlgoliaExceptionpublic SearchSynonymResult searchSynonyms(@Nonnull SynonymQuery query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - the queryrequestOptions - Options to pass to this requestAlgoliaExceptionpublic 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 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 Task batchSynonyms(@Nonnull List<AbstractSynonym> synonyms, boolean forwardToReplicas) throws AlgoliaException
synonyms - List of synonymsforwardToReplicas - Forward the operation to the slave indicesAlgoliaExceptionpublic 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 Task batchSynonyms(@Nonnull List<AbstractSynonym> synonyms) throws AlgoliaException
synonyms - List of synonymsAlgoliaExceptionpublic Task batchSynonyms(@Nonnull List<AbstractSynonym> synonyms, @Nonnull RequestOptions requestOptions) throws AlgoliaException
synonyms - List of synonymsrequestOptions - Options to pass to this requestAlgoliaExceptionpublic TaskSingleIndex partialUpdateObject(@Nonnull String objectID, @Nonnull Object object) throws AlgoliaException
objectID - the ID of object to updateobject - the object to updateAlgoliaException& subclassespublic 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 TaskSingleIndex partialUpdateObjects(@Nonnull List<Object> objects) throws AlgoliaException
objects - the list of objects to update (with an objectID)AlgoliaExceptionpublic 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 TaskSingleIndex partialUpdateObject(@Nonnull PartialUpdateOperation operation) throws AlgoliaException
operation - the operation to perform on this objectAlgoliaException& subclassespublic 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 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 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 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 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 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 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 SearchFacetResult searchInFacetValues(@Nonnull String facetName, @Nonnull String facetQuery, Query query) throws AlgoliaException
AlgoliaException@Deprecated public SearchFacetResult searchInFacetValues(@Nonnull String facetName, @Nonnull String facetQuery) throws AlgoliaException
AlgoliaException@Deprecated public SearchFacetResult searchFacet(@Nonnull String facetName, @Nonnull String facetQuery, Query query) throws AlgoliaException
AlgoliaException@Deprecated public SearchFacetResult searchFacet(@Nonnull String facetName, @Nonnull String facetQuery) throws AlgoliaException
AlgoliaException@Deprecated public List<ApiKey> listKeys() throws AlgoliaException
AlgoliaExceptionpublic List<ApiKey> listApiKeys() throws AlgoliaException
AlgoliaExceptionpublic List<ApiKey> listApiKeys(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaException@Deprecated public Optional<ApiKey> getKey(@Nonnull String key) throws AlgoliaException
AlgoliaExceptionpublic Optional<ApiKey> getApiKey(@Nonnull String key) throws AlgoliaException
key - the key nameAlgoliaExceptionpublic Optional<ApiKey> getApiKey(@Nonnull String key, @Nonnull RequestOptions requestOptions) throws AlgoliaException
key - the key namerequestOptions - Options to pass to this requestAlgoliaException@Deprecated public DeleteKey deleteKey(@Nonnull String key) throws AlgoliaException
AlgoliaExceptionpublic DeleteKey deleteApiKey(@Nonnull String key) throws AlgoliaException
key - the key nameAlgoliaExceptionpublic DeleteKey deleteApiKey(@Nonnull String key, @Nonnull RequestOptions requestOptions) throws AlgoliaException
key - the key namerequestOptions - Options to pass to this requestAlgoliaException@Deprecated public CreateUpdateKey addKey(@Nonnull ApiKey key) throws AlgoliaException
AlgoliaExceptionpublic CreateUpdateKey addApiKey(@Nonnull ApiKey key) throws AlgoliaException
key - the keyAlgoliaExceptionpublic CreateUpdateKey addApiKey(@Nonnull ApiKey key, @Nonnull RequestOptions requestOptions) throws AlgoliaException
key - the keyrequestOptions - Options to pass to this requestAlgoliaExceptionpublic CreateUpdateKey updateKey(@Nonnull String keyName, @Nonnull ApiKey key) throws AlgoliaException
keyName - the key namekey - the key to updateAlgoliaExceptionpublic 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 IndexSettings getSettings() throws AlgoliaException
AlgoliaExceptionpublic IndexSettings getSettings(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic Task setSettings(@Nonnull IndexSettings settings) throws AlgoliaException
settings - the settings to setAlgoliaExceptionpublic Task setSettings(@Nonnull IndexSettings settings, @Nonnull RequestOptions requestOptions) throws AlgoliaException
settings - the settings to setrequestOptions - Options to pass to this requestAlgoliaExceptionpublic Task setSettings(@Nonnull IndexSettings settings, @Nonnull Boolean forwardToReplicas) throws AlgoliaException
settings - the settings to setforwardToReplicas - should these updates be forwarded to the replicasAlgoliaExceptionpublic 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 TaskIndexing addObject(@Nonnull T object) throws AlgoliaException
object - object to addAlgoliaExceptionpublic TaskIndexing addObject(@Nonnull T object, @Nonnull RequestOptions requestOptions) throws AlgoliaException
object - object to addrequestOptions - Options to pass to this requestAlgoliaExceptionpublic 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 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 TaskSingleIndex addObjects(@Nonnull List<T> objects) throws AlgoliaException
objects - objects to addAlgoliaExceptionpublic TaskSingleIndex addObjects(@Nonnull List<T> objects, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objects - objects to addrequestOptions - Options to pass to this requestAlgoliaExceptionpublic Optional<T> getObject(@Nonnull String objectID) throws AlgoliaException
objectID - the unique identifier of the object to retrieveAlgoliaExceptionpublic 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 List<T> getObjects(@Nonnull List<String> objectIDs) throws AlgoliaException
objectIDs - the list of unique identifier of objects to retrieveAlgoliaExceptionpublic 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 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 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 Task saveObject(@Nonnull String objectID, @Nonnull T object) throws AlgoliaException
objectID - the unique identifier of the object to retrieveobject - the object to updateAlgoliaExceptionpublic 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 TaskSingleIndex saveObjects(@Nonnull List<T> objects) throws AlgoliaException
objects - the list objects to updateAlgoliaExceptionpublic TaskSingleIndex saveObjects(@Nonnull List<T> objects, @Nonnull RequestOptions requestOptions) throws AlgoliaException
objects - the list objects to updaterequestOptions - Options to pass to this requestAlgoliaExceptionpublic Task deleteObject(@Nonnull String objectID) throws AlgoliaException
objectID - the unique identifier of the object to retrieveAlgoliaExceptionpublic 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 TaskSingleIndex deleteObjects(@Nonnull List<String> objectIDs) throws AlgoliaException
objectIDs - the list of unique identifier of the object to retrieveAlgoliaExceptionpublic 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 void waitTask(@Nonnull Task task, long timeToWait) throws AlgoliaException
task - task to wait fortimeToWait - the time to wait in millisecondsAlgoliaExceptionpublic 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 void waitTask(@Nonnull Task task) throws AlgoliaException
task - task to wait forAlgoliaExceptionpublic void waitTask(@Nonnull Task task, @Nonnull RequestOptions requestOptions) throws AlgoliaException
task - task to wait forrequestOptions - Options to pass to this requestAlgoliaExceptionpublic Task delete() throws AlgoliaException
AlgoliaExceptionpublic Task delete(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic Task clear() throws AlgoliaException
AlgoliaExceptionpublic Task clear(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic 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 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 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 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 Task saveRule(@Nonnull String queryRuleID, @Nonnull Rule content) throws AlgoliaException
queryRuleID - the id of the queryRulecontent - the queryRuleAlgoliaExceptionpublic 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 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 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 Optional<Rule> getRule(@Nonnull String ruleId) throws AlgoliaException
ruleId - the id of the query ruleAlgoliaExceptionpublic Optional<Rule> getRule(@Nonnull String ruleId, @Nonnull RequestOptions requestOptions) throws AlgoliaException
ruleId - the id of the query rulerequestOptions - Options to pass to this requestAlgoliaExceptionpublic Task deleteRule(@Nonnull String ruleId) throws AlgoliaException
ruleId - the id of the queryRuleAlgoliaExceptionpublic Task deleteRule(@Nonnull String ruleId, @Nonnull RequestOptions requestOptions) throws AlgoliaException
ruleId - the id of the queryRulerequestOptions - Options to pass to this requestAlgoliaExceptionpublic 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 Task clearRules() throws AlgoliaException
AlgoliaExceptionpublic Task clearRules(@Nonnull RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic Task clearRules(boolean forwardToReplicas) throws AlgoliaException
AlgoliaExceptionpublic Task clearRules(boolean forwardToReplicas, @Nonnull RequestOptions requestOptions) throws AlgoliaException
forwardToReplicas - should this request be forwarded to replicasrequestOptions - Options to pass to this requestAlgoliaExceptionpublic SearchRuleResult searchRules(@Nonnull RuleQuery query) throws AlgoliaException
query - the queryAlgoliaExceptionpublic SearchRuleResult searchRules(@Nonnull RuleQuery query, @Nonnull RequestOptions requestOptions) throws AlgoliaException
query - the queryrequestOptions - Options to pass to this requestAlgoliaExceptionpublic 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 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 Task batchRules(@Nonnull List<Rule> rules, boolean forwardToReplicas) throws AlgoliaException
rules - List of RulesforwardToReplicas - Forward the operation to the slave indicesAlgoliaExceptionpublic 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 Task batchRules(@Nonnull List<Rule> rules) throws AlgoliaException
rules - List of RulesAlgoliaExceptionpublic 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.