algolia v0.5.0 Algolia

Elixir implementation of Algolia search API, using Hackney for http requests

Summary

Functions

Add an object with an attribute as the objectID

Add multiple objects

Add multiple objects, with an attribute as objectID

Clears all content of an index

Copies an index to a new one

Delete a object by its objectID

Delete multiple objects

Get an object in an index by objectID

Get the settings of a index

List all indexes

Moves an index to new one

Partially updates an object, takes option upsert: true or false

Save a single object, without objectID specified, must have objectID as a field

Save multiple objects

Search a single index

Set the settings of a index

Convinient version of wait_task/4, accepts a response to be waited on directly. This enables piping a operation directly into wait_task

Wait for a task for an index to complete returns :ok when it’s done

Functions

add_object(index, object)

Add an Object

add_object(index, object, list)

Add an object with an attribute as the objectID

add_objects(index, objects)

Add multiple objects

add_objects(index, objects, list)

Add multiple objects, with an attribute as objectID

api_key()
application_id()
clear_index(index)

Clears all content of an index

copy_index(src_index, dst_index)

Copies an index to a new one

delete_object(index, object_id)

Delete a object by its objectID

delete_objects(index, object_ids)

Delete multiple objects

format_multi_params(query)
get_object(index, object_id)

Get an object in an index by objectID

get_settings(index)

Get the settings of a index

list_indexes()

List all indexes

move_index(src_index, dst_index)

Moves an index to new one

multi(queries, opts \\ [strategy: :none])

Multiple queries

partial_update_object(index, object, object_id, opts \\ [upsert?: true])

Partially updates an object, takes option upsert: true or false

partial_update_objects(index, objects, opts \\ [upsert?: true, id_attribute: :objectID])

Partially updates multiple objects

save_object(index, object)
save_object(index, object, object_id)

Save a single object, without objectID specified, must have objectID as a field

save_objects(index, objects)
save_objects(index, objects, list)

Save multiple objects

search(index, query)
search(index, query, opts)

Search a single index

set_settings(index, settings)

Set the settings of a index

wait(response)
wait(arg, time_before_retry)

Convinient version of wait_task/4, accepts a response to be waited on directly. This enables piping a operation directly into wait_task

wait_task(index, task_id, time_before_retry \\ 1000)

Wait for a task for an index to complete returns :ok when it’s done