Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README #113

Merged
merged 3 commits into from
Jun 9, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ Check our [online guides](https://www.algolia.com/doc):
Add a new object to the Index
==================

Each entry in an index has a unique identifier called `objectID`. There are two ways to add en entry to the index:
Each entry in an index has a unique identifier called `objectID`. There are two ways to add an entry to the index:

1. Using automatic `objectID` assignment. You will be able to access it in the answer.
2. Supplying your own `objectID`.
Expand Down Expand Up @@ -1121,7 +1121,7 @@ You can also use a string array encoding (for example `numericFilters: ["price>1
</div>
</td>
<td class='client-readme-param-content'>
<p>Filter the query by a set of tags. You can AND tags by separating them with commas. To OR tags, you must add parentheses. For example, <code>tags=tag1,(tag2,tag3)</code> means <em>tag1 AND (tag2 OR tag3)</em>. You can also use a string array encoding. For example, <code>tagFilters: [&quot;tag1&quot;,[&quot;tag2&quot;,&quot;tag3&quot;]]</code> means <em>tag1 AND (tag2 OR tag3)</em>.</p>
<p>Filter the query by a set of tags. You can AND tags by separating them with commas. To OR tags, you must add parentheses. For example, <code>tagFilters=tag1,(tag2,tag3)</code> means <em>tag1 AND (tag2 OR tag3)</em>. You can also use a string array encoding. For example, <code>tagFilters: [&quot;tag1&quot;,[&quot;tag2&quot;,&quot;tag3&quot;]]</code> means <em>tag1 AND (tag2 OR tag3)</em>. Negations are supported via the <code>-</code> operator, prefixing the value. For example: <code>tagFilters=tag1,-tag2</code>.</p>

<p>At indexing, tags should be added in the <strong>_tags</strong> attribute of objects. For example <code>{&quot;_tags&quot;:[&quot;tag1&quot;,&quot;tag2&quot;]}</code>.</p>

Expand Down Expand Up @@ -1340,6 +1340,18 @@ You can delete an object using its `objectID`:
client.execute { delete from "toto" objectId "oid" }
```

Delete by query
==================

You can delete all objects matching a single query with the following code. Internally, the API client performs the query, deletes all matching hits, and waits until the deletions have been applied.

As the delete by query calls the browse API in sequence, this functionnality is provided in a helper class.

```scala
val helper = AlgoliaSyncHelper(client)
val query = Query(filters = Some("price > 10"))
val delete = helper.deleteByQuery[MyCaseClass]("myIndex", query)
```


Index Settings
Expand Down