public class Index extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Index.IndexBrowser
This class iterates over an index using the cursor-based browse mechanism
|
| Modifier | Constructor and Description |
|---|---|
protected |
Index(APIClient client,
String indexName)
Index initialization (You should not call this yourself)
|
| Modifier and Type | Method and Description |
|---|---|
org.json.JSONObject |
addApiKey(org.json.JSONObject params)
Create a new api key
|
org.json.JSONObject |
addApiKey(org.json.JSONObject params,
RequestOptions requestOptions)
Create a new api key
|
org.json.JSONObject |
addApiKey(List<String> acls)
Create a new api key
|
org.json.JSONObject |
addApiKey(List<String> acls,
int validity,
int maxQueriesPerIPPerHour,
int maxHitsPerQuery)
Create a new api key
|
org.json.JSONObject |
addApiKey(List<String> acls,
int validity,
int maxQueriesPerIPPerHour,
int maxHitsPerQuery,
RequestOptions requestOptions)
Create a new api key
|
org.json.JSONObject |
addObject(org.json.JSONObject obj)
Add an object in this index
|
org.json.JSONObject |
addObject(org.json.JSONObject obj,
RequestOptions requestOptions)
Add an object in this index
|
org.json.JSONObject |
addObject(org.json.JSONObject obj,
String objectID)
Add an object in this index with a uniq identifier
|
org.json.JSONObject |
addObject(org.json.JSONObject obj,
String objectID,
RequestOptions requestOptions)
Add an object in this index with a uniq identifier
|
org.json.JSONObject |
addObjects(org.json.JSONArray objects)
Add several objects
|
org.json.JSONObject |
addObjects(org.json.JSONArray objects,
RequestOptions requestOptions)
Add several objects
|
org.json.JSONObject |
addObjects(List<org.json.JSONObject> objects)
Add several objects
|
org.json.JSONObject |
addObjects(List<org.json.JSONObject> objects,
RequestOptions requestOptions)
Add several objects
|
org.json.JSONObject |
addUserKey(org.json.JSONObject params)
Deprecated.
|
org.json.JSONObject |
addUserKey(List<String> acls)
Deprecated.
|
org.json.JSONObject |
addUserKey(List<String> acls,
int validity,
int maxQueriesPerIPPerHour,
int maxHitsPerQuery)
Deprecated.
|
org.json.JSONObject |
batch(org.json.JSONArray actions)
Custom batch
|
org.json.JSONObject |
batch(org.json.JSONArray actions,
RequestOptions requestOptions)
Custom batch
|
org.json.JSONObject |
batch(List<org.json.JSONObject> actions)
Custom batch
|
org.json.JSONObject |
batch(List<org.json.JSONObject> actions,
RequestOptions requestOptions)
Custom batch
|
org.json.JSONObject |
batchRules(List<org.json.JSONObject> rules)
Add or Replace a list of synonyms
|
org.json.JSONObject |
batchRules(List<org.json.JSONObject> rules,
boolean forwardToReplicas)
Add or Replace a list of synonyms
|
org.json.JSONObject |
batchRules(List<org.json.JSONObject> rules,
boolean forwardToReplicas,
boolean clearExistingRules)
Add or Replace a list of synonyms
|
org.json.JSONObject |
batchRules(List<org.json.JSONObject> rules,
boolean forwardToReplicas,
boolean clearExistingRules,
RequestOptions requestOptions)
Add or Replace a list of synonyms
|
org.json.JSONObject |
batchSynonyms(List<org.json.JSONObject> objects)
Add or Replace a list of synonyms
|
org.json.JSONObject |
batchSynonyms(List<org.json.JSONObject> objects,
boolean forwardToReplicas)
Add or Replace a list of synonyms
|
org.json.JSONObject |
batchSynonyms(List<org.json.JSONObject> objects,
boolean forwardToReplicas,
boolean replaceExistingSynonyms)
Add or Replace a list of synonyms
|
org.json.JSONObject |
batchSynonyms(List<org.json.JSONObject> objects,
boolean forwardToReplicas,
boolean replaceExistingSynonyms,
RequestOptions requestOptions)
Add or Replace a list of synonyms
|
org.json.JSONObject |
batchSynonyms(List<org.json.JSONObject> objects,
boolean forwardToReplicas,
RequestOptions requestOptions)
Add or Replace a list of synonyms
|
org.json.JSONObject |
batchSynonyms(List<org.json.JSONObject> objects,
RequestOptions requestOptions)
Add or Replace a list of synonyms
|
org.json.JSONObject |
browse(int page)
Deprecated.
Use the `browse(Query params)` version
|
org.json.JSONObject |
browse(int page,
int hitsPerPage)
Browse all index content
|
org.json.JSONObject |
browse(int page,
int hitsPerPage,
RequestOptions requestOptions)
Browse all index content
|
Index.IndexBrowser |
browse(Query params)
Browse all index content
|
Index.IndexBrowser |
browse(Query params,
RequestOptions requestOptions)
Browse all index content
|
Index.IndexBrowser |
browseFrom(Query params,
String cursor)
Browse all index content starting from a cursor
|
Index.IndexBrowser |
browseFrom(Query params,
String cursor,
RequestOptions requestOptions)
Browse all index content starting from a cursor
|
Index.IndexBrowser |
browseFrow(Query params,
String cursor)
Deprecated.
|
org.json.JSONObject |
clearIndex()
Delete the index content without removing settings and index specific API keys.
|
org.json.JSONObject |
clearIndex(RequestOptions requestOptions)
Delete the index content without removing settings and index specific API keys.
|
org.json.JSONObject |
clearRules()
Delete all query rules
|
org.json.JSONObject |
clearRules(boolean forwardToReplicas)
Delete all query rules
|
org.json.JSONObject |
clearRules(boolean forwardToReplicas,
RequestOptions requestOptions)
Delete all query rules
|
org.json.JSONObject |
clearSynonyms()
Delete all synonym set
|
org.json.JSONObject |
clearSynonyms(boolean forwardToReplicas)
Delete all synonym set
|
org.json.JSONObject |
clearSynonyms(boolean forwardToReplicas,
RequestOptions requestOptions)
Delete all synonym set
|
org.json.JSONObject |
clearSynonyms(RequestOptions requestOptions)
Delete all synonym set
|
org.json.JSONObject |
deleteApiKey(String key)
Delete an existing api key
|
org.json.JSONObject |
deleteApiKey(String key,
RequestOptions requestOptions)
Delete an existing api key
|
org.json.JSONObject |
deleteBy(Query query)
Delete all objects matching a query
|
org.json.JSONObject |
deleteBy(Query query,
RequestOptions requestOptions)
Delete all objects matching a query
|
void |
deleteByQuery(Query query)
Deprecated.
use deleteBy
|
void |
deleteByQuery(Query query,
int batchLimit)
Deprecated.
use deleteBy
|
void |
deleteByQuery(Query query,
int batchLimit,
RequestOptions requestOptions)
Deprecated.
use deleteBy
|
void |
deleteByQuery(Query query,
RequestOptions requestOptions)
Deprecated.
use deleteBy
|
org.json.JSONObject |
deleteObject(String objectID)
Delete an object from the index
|
org.json.JSONObject |
deleteObject(String objectID,
RequestOptions requestOptions)
Delete an object from the index
|
org.json.JSONObject |
deleteObjects(List<String> objects)
Delete several objects
|
org.json.JSONObject |
deleteObjects(List<String> objects,
RequestOptions requestOptions)
Delete several objects
|
org.json.JSONObject |
deleteRule(String objectID)
Delete a query rule
|
org.json.JSONObject |
deleteRule(String objectID,
RequestOptions requestOptions)
Delete a query rule
|
org.json.JSONObject |
deleteSynonym(String objectID)
Delete one synonym
|
org.json.JSONObject |
deleteSynonym(String objectID,
boolean forwardToReplicas)
Delete one synonym
|
org.json.JSONObject |
deleteSynonym(String objectID,
boolean forwardToReplicas,
RequestOptions requestOptions)
Delete one synonym
|
org.json.JSONObject |
deleteSynonym(String objectID,
RequestOptions requestOptions)
Delete one synonym
|
org.json.JSONObject |
deleteUserKey(String key)
Deprecated.
|
org.json.JSONObject |
getApiKey(String key)
Get ACL of an api key
|
org.json.JSONObject |
getApiKey(String key,
RequestOptions requestOptions)
Get ACL of an api key
|
String |
getIndexName() |
org.json.JSONObject |
getObject(String objectID)
Get an object from this index.
|
org.json.JSONObject |
getObject(String objectID,
List<String> attributesToRetrieve)
Get an object from this index
|
org.json.JSONObject |
getObject(String objectID,
List<String> attributesToRetrieve,
RequestOptions requestOptions)
Get an object from this index
|
org.json.JSONObject |
getObject(String objectID,
RequestOptions requestOptions)
Get an object from this index.
|
org.json.JSONObject |
getObjects(List<String> objectIDs)
Get several objects from this index
|
org.json.JSONObject |
getObjects(List<String> objectIDs,
List<String> attributesToRetrieve)
Get several objects from this index
|
org.json.JSONObject |
getObjects(List<String> objectIDs,
List<String> attributesToRetrieve,
RequestOptions requestOptions)
Get several objects from this index
|
org.json.JSONObject |
getObjects(List<String> objectIDs,
RequestOptions requestOptions)
Get several objects from this index
|
org.json.JSONObject |
getRule(String objectID)
Get a query rule
|
org.json.JSONObject |
getRule(String objectID,
RequestOptions requestOptions)
Get a query rule
|
org.json.JSONObject |
getSettings()
Get settings of this index
|
org.json.JSONObject |
getSettings(RequestOptions requestOptions)
Get settings of this index
|
org.json.JSONObject |
getSynonym(String objectID)
Get one synonym
|
org.json.JSONObject |
getSynonym(String objectID,
RequestOptions requestOptions)
Get one synonym
|
org.json.JSONObject |
getUserKeyACL(String key)
Deprecated.
|
org.json.JSONObject |
listApiKeys()
List all existing api keys with their associated ACLs
|
org.json.JSONObject |
listApiKeys(RequestOptions requestOptions)
List all existing api keys with their associated ACLs
|
org.json.JSONObject |
listUserKeys()
Deprecated.
|
org.json.JSONObject |
partialUpdateObject(org.json.JSONObject partialObject,
String objectID)
Update partially an object (only update attributes passed in argument), create the object if it does not exist
|
org.json.JSONObject |
partialUpdateObject(org.json.JSONObject partialObject,
String objectID,
RequestOptions requestOptions)
Update partially an object (only update attributes passed in argument), create the object if it does not exist
|
org.json.JSONObject |
partialUpdateObjectNoCreate(org.json.JSONObject partialObject,
String objectID)
Update partially an object (only update attributes passed in argument), do nothing if object does not exist
|
org.json.JSONObject |
partialUpdateObjectNoCreate(org.json.JSONObject partialObject,
String objectID,
RequestOptions requestOptions)
Update partially an object (only update attributes passed in argument), do nothing if object does not exist
|
org.json.JSONObject |
partialUpdateObjects(org.json.JSONArray objects)
Partially Override the content of several objects
|
org.json.JSONObject |
partialUpdateObjects(org.json.JSONArray objects,
RequestOptions requestOptions)
Partially Override the content of several objects
|
org.json.JSONObject |
partialUpdateObjects(List<org.json.JSONObject> objects)
Partially Override the content of several objects
|
org.json.JSONObject |
partialUpdateObjects(List<org.json.JSONObject> objects,
RequestOptions requestOptions)
Partially Override the content of several objects
|
org.json.JSONObject |
saveObject(org.json.JSONObject object,
String objectID)
Override the content of object
|
org.json.JSONObject |
saveObject(org.json.JSONObject object,
String objectID,
RequestOptions requestOptions)
Override the content of object
|
org.json.JSONObject |
saveObjects(org.json.JSONArray objects)
Override the content of several objects
|
org.json.JSONObject |
saveObjects(org.json.JSONArray objects,
RequestOptions requestOptions)
Override the content of several objects
|
org.json.JSONObject |
saveObjects(List<org.json.JSONObject> objects)
Override the content of several objects
|
org.json.JSONObject |
saveObjects(List<org.json.JSONObject> objects,
RequestOptions requestOptions)
Override the content of several objects
|
org.json.JSONObject |
saveRule(String objectID,
org.json.JSONObject rule)
Save a query rule
|
org.json.JSONObject |
saveRule(String objectID,
org.json.JSONObject rule,
boolean forwardToReplicas)
Save a query rule
|
org.json.JSONObject |
saveRule(String objectID,
org.json.JSONObject rule,
boolean forwardToReplicas,
RequestOptions requestOptions)
Save a query rule
|
org.json.JSONObject |
saveSynonym(String objectID,
org.json.JSONObject content)
Update one synonym
|
org.json.JSONObject |
saveSynonym(String objectID,
org.json.JSONObject content,
boolean forwardToReplicas)
Update one synonym
|
org.json.JSONObject |
saveSynonym(String objectID,
org.json.JSONObject content,
boolean forwardToReplicas,
RequestOptions requestOptions)
Update one synonym
|
org.json.JSONObject |
saveSynonym(String objectID,
org.json.JSONObject content,
RequestOptions requestOptions)
Update one synonym
|
org.json.JSONObject |
search(Query params)
Search inside the index
|
org.json.JSONObject |
search(Query params,
RequestOptions requestOptions)
Search inside the index
|
org.json.JSONObject |
searchDisjunctiveFaceting(Query query,
List<String> disjunctiveFacets) |
org.json.JSONObject |
searchDisjunctiveFaceting(Query query,
List<String> disjunctiveFacets,
Map<String,List<String>> refinements)
Perform a search with disjunctive facets generating as many queries as number of disjunctive facets
|
org.json.JSONObject |
searchInFacetValues(String facetName,
String facetQuery,
Query params)
Search into a facet value
|
org.json.JSONObject |
searchInFacetValues(String facetName,
String facetQuery,
Query params,
RequestOptions requestOptions)
Search into a facet value
|
org.json.JSONObject |
searchRules(RuleQuery query)
Search for query rules
|
org.json.JSONObject |
searchRules(RuleQuery query,
RequestOptions requestOptions)
Search for query rules
|
org.json.JSONObject |
searchSynonyms(SynonymQuery query)
Search for synonyms
|
org.json.JSONObject |
searchSynonyms(SynonymQuery query,
RequestOptions requestOptions)
Search for synonyms
|
org.json.JSONObject |
setSettings(org.json.JSONObject settings)
Set settings for this index
|
org.json.JSONObject |
setSettings(org.json.JSONObject settings,
Boolean forwardToReplicas) |
org.json.JSONObject |
setSettings(org.json.JSONObject settings,
Boolean forwardToReplicas,
RequestOptions requestOptions) |
org.json.JSONObject |
setSettings(org.json.JSONObject settings,
RequestOptions requestOptions)
Set settings for this index
|
org.json.JSONObject |
updateApiKey(String key,
org.json.JSONObject params)
Update a new api key
|
org.json.JSONObject |
updateApiKey(String key,
org.json.JSONObject params,
RequestOptions requestOptions)
Update a new api key
|
org.json.JSONObject |
updateApiKey(String key,
List<String> acls)
Update an api key
|
org.json.JSONObject |
updateApiKey(String key,
List<String> acls,
int validity,
int maxQueriesPerIPPerHour,
int maxHitsPerQuery)
Update an api key
|
org.json.JSONObject |
updateApiKey(String key,
List<String> acls,
int validity,
int maxQueriesPerIPPerHour,
int maxHitsPerQuery,
RequestOptions requestOptions)
Update an api key
|
org.json.JSONObject |
updateUserKey(String key,
org.json.JSONObject params)
Deprecated.
|
org.json.JSONObject |
updateUserKey(String key,
List<String> acls)
Deprecated.
|
org.json.JSONObject |
updateUserKey(String key,
List<String> acls,
int validity,
int maxQueriesPerIPPerHour,
int maxHitsPerQuery)
Deprecated.
|
void |
waitTask(Long taskID)
Wait the publication of a task on the server.
|
void |
waitTask(String taskID)
Wait the publication of a task on the server.
|
void |
waitTask(String taskID,
long timeToWait)
Wait the publication of a task on the server.
|
void |
waitTask(String taskID,
long timeToWait,
RequestOptions requestOptions)
Wait the publication of a task on the server.
|
public String getIndexName()
public org.json.JSONObject addObject(org.json.JSONObject obj)
throws AlgoliaException
obj - the object to addAlgoliaExceptionpublic org.json.JSONObject addObject(org.json.JSONObject obj,
RequestOptions requestOptions)
throws AlgoliaException
obj - the object to addrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject addObject(org.json.JSONObject obj,
String objectID)
throws AlgoliaException
obj - the object to addobjectID - the objectID associated to this object
(if this objectID already exist the old object will be overriden)AlgoliaExceptionpublic org.json.JSONObject addObject(org.json.JSONObject obj,
String objectID,
RequestOptions requestOptions)
throws AlgoliaException
obj - the object to addobjectID - the objectID associated to this object
(if this objectID already exist the old object will be overriden)requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject batch(org.json.JSONArray actions)
throws AlgoliaException
actions - the array of actionsAlgoliaExceptionpublic org.json.JSONObject batch(org.json.JSONArray actions,
RequestOptions requestOptions)
throws AlgoliaException
actions - the array of actionsrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject batch(List<org.json.JSONObject> actions) throws AlgoliaException
actions - the array of actionsAlgoliaExceptionpublic org.json.JSONObject batch(List<org.json.JSONObject> actions, RequestOptions requestOptions) throws AlgoliaException
actions - the array of actionsrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject addObjects(List<org.json.JSONObject> objects) throws AlgoliaException
objects - the array of objects to addAlgoliaExceptionpublic org.json.JSONObject addObjects(List<org.json.JSONObject> objects, RequestOptions requestOptions) throws AlgoliaException
objects - the array of objects to addrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject addObjects(org.json.JSONArray objects)
throws AlgoliaException
objects - the array of objects to addAlgoliaExceptionpublic org.json.JSONObject addObjects(org.json.JSONArray objects,
RequestOptions requestOptions)
throws AlgoliaException
objects - the array of objects to addrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject getObject(String objectID) throws AlgoliaException
objectID - the unique identifier of the object to retrieveAlgoliaExceptionpublic org.json.JSONObject getObject(String objectID, RequestOptions requestOptions) throws AlgoliaException
objectID - the unique identifier of the object to retrieverequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject getObject(String objectID, List<String> attributesToRetrieve) throws AlgoliaException
objectID - the unique identifier of the object to retrieveattributesToRetrieve - contains the list of attributes to retrieve.AlgoliaExceptionpublic org.json.JSONObject getObject(String objectID, List<String> attributesToRetrieve, RequestOptions requestOptions) throws AlgoliaException
objectID - the unique identifier of the object to retrieveattributesToRetrieve - contains the list of attributes to retrieve.requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject getObjects(List<String> objectIDs) throws AlgoliaException
objectIDs - the array of unique identifier of objects to retrieveAlgoliaExceptionpublic org.json.JSONObject getObjects(List<String> objectIDs, RequestOptions requestOptions) throws AlgoliaException
objectIDs - the array of unique identifier of objects to retrieverequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject getObjects(List<String> objectIDs, List<String> attributesToRetrieve) throws AlgoliaException
objectIDs - the array of unique identifier of objects to retrieveattributesToRetrieve - contains the list of attributes to retrieve.AlgoliaExceptionpublic org.json.JSONObject getObjects(List<String> objectIDs, List<String> attributesToRetrieve, RequestOptions requestOptions) throws AlgoliaException
objectIDs - the array of unique identifier of objects to retrieveattributesToRetrieve - contains the list of attributes to retrieve.requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject partialUpdateObject(org.json.JSONObject partialObject,
String objectID)
throws AlgoliaException
partialObject - the object to overrideAlgoliaExceptionpublic org.json.JSONObject partialUpdateObject(org.json.JSONObject partialObject,
String objectID,
RequestOptions requestOptions)
throws AlgoliaException
partialObject - the object to overriderequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject partialUpdateObjectNoCreate(org.json.JSONObject partialObject,
String objectID)
throws AlgoliaException
partialObject - the object to overrideAlgoliaExceptionpublic org.json.JSONObject partialUpdateObjectNoCreate(org.json.JSONObject partialObject,
String objectID,
RequestOptions requestOptions)
throws AlgoliaException
partialObject - the object to overriderequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject partialUpdateObjects(org.json.JSONArray objects)
throws AlgoliaException
objects - the array of objects to update (each object must contains an objectID attribute)AlgoliaExceptionpublic org.json.JSONObject partialUpdateObjects(org.json.JSONArray objects,
RequestOptions requestOptions)
throws AlgoliaException
objects - the array of objects to update (each object must contains an objectID attribute)requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject partialUpdateObjects(List<org.json.JSONObject> objects) throws AlgoliaException
objects - the array of objects to update (each object must contains an objectID attribute)AlgoliaExceptionpublic org.json.JSONObject partialUpdateObjects(List<org.json.JSONObject> objects, RequestOptions requestOptions) throws AlgoliaException
objects - the array of objects to update (each object must contains an objectID attribute)requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject saveObject(org.json.JSONObject object,
String objectID)
throws AlgoliaException
object - the object to updateAlgoliaExceptionpublic org.json.JSONObject saveObject(org.json.JSONObject object,
String objectID,
RequestOptions requestOptions)
throws AlgoliaException
object - the object to updaterequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject saveObjects(List<org.json.JSONObject> objects) throws AlgoliaException
objects - the array of objects to update (each object must contains an objectID attribute)AlgoliaExceptionpublic org.json.JSONObject saveObjects(List<org.json.JSONObject> objects, RequestOptions requestOptions) throws AlgoliaException
objects - the array of objects to update (each object must contains an objectID attribute)requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject saveObjects(org.json.JSONArray objects)
throws AlgoliaException
objects - the array of objects to update (each object must contains an objectID attribute)AlgoliaExceptionpublic org.json.JSONObject saveObjects(org.json.JSONArray objects,
RequestOptions requestOptions)
throws AlgoliaException
objects - the array of objects to update (each object must contains an objectID attribute)requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject deleteObject(String objectID) throws AlgoliaException
objectID - the unique identifier of object to deleteAlgoliaExceptionpublic org.json.JSONObject deleteObject(String objectID, RequestOptions requestOptions) throws AlgoliaException
objectID - the unique identifier of object to deleterequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject deleteBy(Query query) throws AlgoliaException
query - the query stringAlgoliaExceptionpublic org.json.JSONObject deleteBy(Query query, RequestOptions requestOptions) throws AlgoliaException
query - the query stringrequestOptions - Options to pass to this requestAlgoliaException@Deprecated public void deleteByQuery(Query query) throws AlgoliaException
query - the query stringAlgoliaException@Deprecated public void deleteByQuery(Query query, RequestOptions requestOptions) throws AlgoliaException
query - the query stringrequestOptions - Options to pass to this requestAlgoliaException@Deprecated public void deleteByQuery(Query query, int batchLimit, RequestOptions requestOptions) throws AlgoliaException
AlgoliaException@Deprecated public void deleteByQuery(Query query, int batchLimit) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject search(Query params) throws AlgoliaException
the - query to searchAlgoliaExceptionpublic org.json.JSONObject search(Query params, RequestOptions requestOptions) throws AlgoliaException
the - query to searchrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject searchInFacetValues(String facetName, String facetQuery, Query params) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject searchInFacetValues(String facetName, String facetQuery, Query params, RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject deleteObjects(List<String> objects) throws AlgoliaException
objects - the array of objectIDs to deleteAlgoliaExceptionpublic org.json.JSONObject deleteObjects(List<String> objects, RequestOptions requestOptions) throws AlgoliaException
objects - the array of objectIDs to deleterequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject browse(int page)
throws AlgoliaException
page - Pagination parameter used to select the page to retrieve.
Page is zero-based and defaults to 0. Thus, to retrieve the 10th page you need to set page=9AlgoliaExceptionpublic Index.IndexBrowser browse(Query params) throws AlgoliaException
AlgoliaExceptionpublic Index.IndexBrowser browse(Query params, RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic Index.IndexBrowser browseFrom(Query params, String cursor) throws AlgoliaException
AlgoliaExceptionpublic Index.IndexBrowser browseFrom(Query params, String cursor, RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaException@Deprecated public Index.IndexBrowser browseFrow(Query params, String cursor) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject browse(int page,
int hitsPerPage)
throws AlgoliaException
page - Pagination parameter used to select the page to retrieve.
Page is zero-based and defaults to 0. Thus, to retrieve the 10th page you need to set page=9hitsPerPage - Pagination parameter used to select the number of hits per page. Defaults to 1000.AlgoliaExceptionpublic org.json.JSONObject browse(int page,
int hitsPerPage,
RequestOptions requestOptions)
throws AlgoliaException
page - Pagination parameter used to select the page to retrieve.
Page is zero-based and defaults to 0. Thus, to retrieve the 10th page you need to set page=9hitsPerPage - Pagination parameter used to select the number of hits per page. Defaults to 1000.requestOptions - Options to pass to this requestAlgoliaExceptionpublic void waitTask(String taskID, long timeToWait) throws AlgoliaException
taskID - the id of the task returned by servertimeToWait - time to sleep seedAlgoliaExceptionpublic void waitTask(String taskID, long timeToWait, RequestOptions requestOptions) throws AlgoliaException
taskID - the id of the task returned by servertimeToWait - time to sleep seedrequestOptions - Options to pass to this requestAlgoliaExceptionpublic void waitTask(String taskID) throws AlgoliaException
taskID - the id of the task returned by serverAlgoliaExceptionpublic void waitTask(Long taskID) throws AlgoliaException
taskID - the id of the task returned by serverAlgoliaExceptionpublic org.json.JSONObject getSettings()
throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject getSettings(RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject clearIndex()
throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject clearIndex(RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject setSettings(org.json.JSONObject settings)
throws AlgoliaException
settings - the settings for an indexAlgoliaExceptionpublic org.json.JSONObject setSettings(org.json.JSONObject settings,
RequestOptions requestOptions)
throws AlgoliaException
settings - the settings for an indexrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject setSettings(org.json.JSONObject settings,
Boolean forwardToReplicas)
throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject setSettings(org.json.JSONObject settings,
Boolean forwardToReplicas,
RequestOptions requestOptions)
throws AlgoliaException
AlgoliaException@Deprecated public org.json.JSONObject listUserKeys() throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject listApiKeys()
throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject listApiKeys(RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaException@Deprecated public org.json.JSONObject getUserKeyACL(String key) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject getApiKey(String key) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject getApiKey(String key, RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaException@Deprecated public org.json.JSONObject deleteUserKey(String key) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject deleteApiKey(String key) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject deleteApiKey(String key, RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaException@Deprecated public org.json.JSONObject addUserKey(org.json.JSONObject params) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject addApiKey(org.json.JSONObject params)
throws AlgoliaException
params - the list of parameters for this key. Defined by a JSONObject that
can contains the following values:
- acl: array of string
- indices: array of string
- validity: int
- referers: array of string
- description: string
- maxHitsPerQuery: integer
- queryParameters: string
- maxQueriesPerIPPerHour: integerAlgoliaExceptionpublic org.json.JSONObject addApiKey(org.json.JSONObject params,
RequestOptions requestOptions)
throws AlgoliaException
params - the list of parameters for this key. Defined by a JSONObject that
can contains the following values:
- acl: array of string
- indices: array of string
- validity: int
- referers: array of string
- description: string
- maxHitsPerQuery: integer
- queryParameters: string
- maxQueriesPerIPPerHour: integerrequestOptions - Options to pass to this requestAlgoliaException@Deprecated public org.json.JSONObject addUserKey(List<String> acls) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject addApiKey(List<String> acls) throws AlgoliaException
acls - the list of ACL for this key. Defined by an array of strings that
can contains the following values:
- search: allow to search (https and http)
- addObject: allows to add/update an object in the index (https only)
- deleteObject : allows to delete an existing object (https only)
- deleteIndex : allows to delete index content (https only)
- settings : allows to get index settings (https only)
- editSettings : allows to change index settings (https only)AlgoliaException@Deprecated public org.json.JSONObject updateUserKey(String key, org.json.JSONObject params) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject updateApiKey(String key, org.json.JSONObject params) throws AlgoliaException
params - the list of parameters for this key. Defined by a JSONObject that
can contains the following values:
- acl: array of string
- indices: array of string
- validity: int
- referers: array of string
- description: string
- maxHitsPerQuery: integer
- queryParameters: string
- maxQueriesPerIPPerHour: integerAlgoliaExceptionpublic org.json.JSONObject updateApiKey(String key, org.json.JSONObject params, RequestOptions requestOptions) throws AlgoliaException
params - the list of parameters for this key. Defined by a JSONObject that
can contains the following values:
- acl: array of string
- indices: array of string
- validity: int
- referers: array of string
- description: string
- maxHitsPerQuery: integer
- queryParameters: string
- maxQueriesPerIPPerHour: integerrequestOptions - Options to pass to this requestAlgoliaException@Deprecated public org.json.JSONObject updateUserKey(String key, List<String> acls) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject updateApiKey(String key, List<String> acls) throws AlgoliaException
acls - the list of ACL for this key. Defined by an array of strings that
can contains the following values:
- search: allow to search (https and http)
- addObject: allows to add/update an object in the index (https only)
- deleteObject : allows to delete an existing object (https only)
- deleteIndex : allows to delete index content (https only)
- settings : allows to get index settings (https only)
- editSettings : allows to change index settings (https only)AlgoliaException@Deprecated public org.json.JSONObject addUserKey(List<String> acls, int validity, int maxQueriesPerIPPerHour, int maxHitsPerQuery) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject addApiKey(List<String> acls, int validity, int maxQueriesPerIPPerHour, int maxHitsPerQuery) throws AlgoliaException
acls - the list of ACL for this key. Defined by an array of strings that
can contains the following values:
- search: allow to search (https and http)
- addObject: allows to add/update an object in the index (https only)
- deleteObject : allows to delete an existing object (https only)
- deleteIndex : allows to delete index content (https only)
- settings : allows to get index settings (https only)
- editSettings : allows to change index settings (https only)validity - the number of seconds after which the key will be automatically removed (0 means no time limit for this key)maxQueriesPerIPPerHour - Specify the maximum number of API calls allowed from an IP address per hour. Defaults to 0 (no rate limit).maxHitsPerQuery - Specify the maximum number of hits this API key can retrieve in one call. Defaults to 0 (unlimited)AlgoliaExceptionpublic org.json.JSONObject addApiKey(List<String> acls, int validity, int maxQueriesPerIPPerHour, int maxHitsPerQuery, RequestOptions requestOptions) throws AlgoliaException
acls - the list of ACL for this key. Defined by an array of strings that
can contains the following values:
- search: allow to search (https and http)
- addObject: allows to add/update an object in the index (https only)
- deleteObject : allows to delete an existing object (https only)
- deleteIndex : allows to delete index content (https only)
- settings : allows to get index settings (https only)
- editSettings : allows to change index settings (https only)validity - the number of seconds after which the key will be automatically removed (0 means no time limit for this key)maxQueriesPerIPPerHour - Specify the maximum number of API calls allowed from an IP address per hour. Defaults to 0 (no rate limit).maxHitsPerQuery - Specify the maximum number of hits this API key can retrieve in one call. Defaults to 0 (unlimited)requestOptions - Options to pass to this requestAlgoliaException@Deprecated public org.json.JSONObject updateUserKey(String key, List<String> acls, int validity, int maxQueriesPerIPPerHour, int maxHitsPerQuery) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject updateApiKey(String key, List<String> acls, int validity, int maxQueriesPerIPPerHour, int maxHitsPerQuery) throws AlgoliaException
acls - the list of ACL for this key. Defined by an array of strings that
can contains the following values:
- search: allow to search (https and http)
- addObject: allows to add/update an object in the index (https only)
- deleteObject : allows to delete an existing object (https only)
- deleteIndex : allows to delete index content (https only)
- settings : allows to get index settings (https only)
- editSettings : allows to change index settings (https only)validity - the number of seconds after which the key will be automatically removed (0 means no time limit for this key)maxQueriesPerIPPerHour - Specify the maximum number of API calls allowed from an IP address per hour. Defaults to 0 (no rate limit).maxHitsPerQuery - Specify the maximum number of hits this API key can retrieve in one call. Defaults to 0 (unlimited)AlgoliaExceptionpublic org.json.JSONObject updateApiKey(String key, List<String> acls, int validity, int maxQueriesPerIPPerHour, int maxHitsPerQuery, RequestOptions requestOptions) throws AlgoliaException
acls - the list of ACL for this key. Defined by an array of strings that
can contains the following values:
- search: allow to search (https and http)
- addObject: allows to add/update an object in the index (https only)
- deleteObject : allows to delete an existing object (https only)
- deleteIndex : allows to delete index content (https only)
- settings : allows to get index settings (https only)
- editSettings : allows to change index settings (https only)validity - the number of seconds after which the key will be automatically removed (0 means no time limit for this key)maxQueriesPerIPPerHour - Specify the maximum number of API calls allowed from an IP address per hour. Defaults to 0 (no rate limit).maxHitsPerQuery - Specify the maximum number of hits this API key can retrieve in one call. Defaults to 0 (unlimited)requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject searchDisjunctiveFaceting(Query query, List<String> disjunctiveFacets, Map<String,List<String>> refinements) throws AlgoliaException
query - the querydisjunctiveFacets - the array of disjunctive facetsrefinements - MapAlgoliaExceptionpublic org.json.JSONObject searchDisjunctiveFaceting(Query query, List<String> disjunctiveFacets) throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject searchSynonyms(SynonymQuery query) throws AlgoliaException, org.json.JSONException
query - the queryAlgoliaExceptionorg.json.JSONExceptionpublic org.json.JSONObject searchSynonyms(SynonymQuery query, RequestOptions requestOptions) throws AlgoliaException, org.json.JSONException
query - the queryrequestOptions - Options to pass to this requestAlgoliaExceptionorg.json.JSONExceptionpublic org.json.JSONObject getSynonym(String objectID) throws AlgoliaException
objectID - the objectId of the synonym to getAlgoliaExceptionpublic org.json.JSONObject getSynonym(String objectID, RequestOptions requestOptions) throws AlgoliaException
objectID - the objectId of the synonym to getrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject deleteSynonym(String objectID, boolean forwardToReplicas) throws AlgoliaException
objectID - The objectId of the synonym to deleteforwardToReplicas - Forward the operation to the replica indicesAlgoliaExceptionpublic org.json.JSONObject deleteSynonym(String objectID, boolean forwardToReplicas, RequestOptions requestOptions) throws AlgoliaException
objectID - The objectId of the synonym to deleteforwardToReplicas - Forward the operation to the replica indicesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject deleteSynonym(String objectID) throws AlgoliaException
objectID - The objectId of the synonym to deleteAlgoliaExceptionpublic org.json.JSONObject deleteSynonym(String objectID, RequestOptions requestOptions) throws AlgoliaException
objectID - The objectId of the synonym to deleterequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject clearSynonyms(boolean forwardToReplicas)
throws AlgoliaException
forwardToReplicas - Forward the operation to the replica indicesAlgoliaExceptionpublic org.json.JSONObject clearSynonyms(boolean forwardToReplicas,
RequestOptions requestOptions)
throws AlgoliaException
forwardToReplicas - Forward the operation to the replica indicesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject clearSynonyms()
throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject clearSynonyms(RequestOptions requestOptions) throws AlgoliaException
requestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject batchSynonyms(List<org.json.JSONObject> objects, boolean forwardToReplicas, boolean replaceExistingSynonyms) throws AlgoliaException
objects - List of synonymsforwardToReplicas - Forward the operation to the replica indicesreplaceExistingSynonyms - Replace the existing synonyms with this batchAlgoliaExceptionpublic org.json.JSONObject batchSynonyms(List<org.json.JSONObject> objects, boolean forwardToReplicas, boolean replaceExistingSynonyms, RequestOptions requestOptions) throws AlgoliaException
objects - List of synonymsforwardToReplicas - Forward the operation to the replica indicesreplaceExistingSynonyms - Replace the existing synonyms with this batchrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject batchSynonyms(List<org.json.JSONObject> objects, boolean forwardToReplicas) throws AlgoliaException
objects - List of synonymsforwardToReplicas - Forward the operation to the replica indicesAlgoliaExceptionpublic org.json.JSONObject batchSynonyms(List<org.json.JSONObject> objects, boolean forwardToReplicas, RequestOptions requestOptions) throws AlgoliaException
objects - List of synonymsforwardToReplicas - Forward the operation to the replica indicesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject batchSynonyms(List<org.json.JSONObject> objects) throws AlgoliaException
objects - List of synonymsAlgoliaExceptionpublic org.json.JSONObject batchSynonyms(List<org.json.JSONObject> objects, RequestOptions requestOptions) throws AlgoliaException
objects - List of synonymsrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject saveSynonym(String objectID, org.json.JSONObject content, boolean forwardToReplicas) throws AlgoliaException
objectID - The objectId of the synonym to savecontent - The new content of this synonymforwardToReplicas - Forward the operation to the replica indicesAlgoliaExceptionpublic org.json.JSONObject saveSynonym(String objectID, org.json.JSONObject content, boolean forwardToReplicas, RequestOptions requestOptions) throws AlgoliaException
objectID - The objectId of the synonym to savecontent - The new content of this synonymforwardToReplicas - Forward the operation to the replica indicesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject saveSynonym(String objectID, org.json.JSONObject content) throws AlgoliaException
objectID - The objectId of the synonym to savecontent - The new content of this synonymAlgoliaExceptionpublic org.json.JSONObject saveSynonym(String objectID, org.json.JSONObject content, RequestOptions requestOptions) throws AlgoliaException
objectID - The objectId of the synonym to savecontent - The new content of this synonymrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject saveRule(String objectID, org.json.JSONObject rule, boolean forwardToReplicas) throws AlgoliaException
objectID - the objectId of the query rule to saverule - the content of this query ruleforwardToReplicas - Forward this operation to the replica indicesAlgoliaExceptionpublic org.json.JSONObject saveRule(String objectID, org.json.JSONObject rule, boolean forwardToReplicas, RequestOptions requestOptions) throws AlgoliaException
objectID - the objectId of the query rule to saverule - the content of this query ruleforwardToReplicas - Forward this operation to the replica indicesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject saveRule(String objectID, org.json.JSONObject rule) throws AlgoliaException
objectID - the objectId of the query rule to saverule - the content of this query ruleAlgoliaExceptionpublic org.json.JSONObject batchRules(List<org.json.JSONObject> rules, boolean forwardToReplicas, boolean clearExistingRules) throws AlgoliaException
rules - the list of rules to add/replaceforwardToReplicas - Forward this operation to the replica indicesclearExistingRules - Replace the existing query rules with this batchAlgoliaExceptionpublic org.json.JSONObject batchRules(List<org.json.JSONObject> rules, boolean forwardToReplicas, boolean clearExistingRules, RequestOptions requestOptions) throws AlgoliaException
rules - the list of rules to add/replaceforwardToReplicas - Forward this operation to the replica indicesclearExistingRules - Replace the existing query rules with this batchrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject batchRules(List<org.json.JSONObject> rules, boolean forwardToReplicas) throws AlgoliaException
rules - the list of rules to add/replaceforwardToReplicas - Forward this operation to the replica indicesAlgoliaExceptionpublic org.json.JSONObject batchRules(List<org.json.JSONObject> rules) throws AlgoliaException
rules - the list of rules to add/replaceAlgoliaExceptionpublic org.json.JSONObject getRule(String objectID) throws AlgoliaException
objectID - the objectID of the query rule to getAlgoliaExceptionpublic org.json.JSONObject getRule(String objectID, RequestOptions requestOptions) throws AlgoliaException
objectID - the objectID of the query rule to getrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject deleteRule(String objectID) throws AlgoliaException
objectID - the objectID of the query rule to deleteAlgoliaExceptionpublic org.json.JSONObject deleteRule(String objectID, RequestOptions requestOptions) throws AlgoliaException
objectID - the objectID of the query rule to deleterequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject clearRules(boolean forwardToReplicas)
throws AlgoliaException
forwardToReplicas - Forward the operation to the replica indicesAlgoliaExceptionpublic org.json.JSONObject clearRules(boolean forwardToReplicas,
RequestOptions requestOptions)
throws AlgoliaException
forwardToReplicas - Forward the operation to the replica indicesrequestOptions - Options to pass to this requestAlgoliaExceptionpublic org.json.JSONObject clearRules()
throws AlgoliaException
AlgoliaExceptionpublic org.json.JSONObject searchRules(RuleQuery query) throws AlgoliaException, org.json.JSONException
query - the queryAlgoliaExceptionorg.json.JSONExceptionpublic org.json.JSONObject searchRules(RuleQuery query, RequestOptions requestOptions) throws AlgoliaException, org.json.JSONException
query - the queryrequestOptions - Options to pass to this requestAlgoliaExceptionorg.json.JSONExceptionCopyright © 2019. All rights reserved.