Skip to content

Commit

Permalink
add more info to README
Browse files Browse the repository at this point in the history
  • Loading branch information
rochacbruno committed Jan 3, 2016
1 parent 08a22a8 commit bfbefd0
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ you can change using **meta** argument.
Person.update_all(
top_5_racing_bikes, # the documents
active=True, # values to be changed
metal={'chunk_size': 200} # meta data passed to **bulk** operation
meta={'chunk_size': 200} # meta data passed to **bulk** operation
)
```

Expand Down Expand Up @@ -523,14 +523,29 @@ Person.search(query=query, size=10)

```python
from esengine import Payload, Query, Filter
payload = Payload(
query=Query.filtered(query=Query.match_all(), filter=Filter.ids([1, 2]))
)
payload = Payload(query=Query.filtered(query=Query.match_all(), filter=Filter.ids([1, 2])))
Person.search(payload, size=10)
```

> Payload utils exposes Payload, Query, Filter, Aggregate, Suggesters
## More examples

You can use Payload, Query or Filter direct in search

```python
from esengine import Payload, Query, Filter

Person.search(Payload(query=Query.match_all()))

Person.search(Query.bool(must=[Query.match("name", "Gonzo")]))

Person.search(Query.match_all())

Person.search(Filter.ids([1, 2, 3]))

```

## chaining

Payload object is chainable so you can do:
Expand Down

0 comments on commit bfbefd0

Please sign in to comment.