Skip to content

Commit

Permalink
Fix readme typos
Browse files Browse the repository at this point in the history
  • Loading branch information
honzakral committed Jun 1, 2014
1 parent a250040 commit 213f1f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@ With the low-level client you would write something like this:
print(hit['_score'], hit['_source']['title'])
Which would be very hard to modify (imagine adding another filter to that
query) and is definitely no fun to write. With the python DSL you can write the same query as:
query) and is definitely no fun to write. With the python DSL you can write the
same query as:

.. code:: python
from elasticsearch_dsl import Search, Q
s = Search(using=es).index("my-index") \
.filter("term", category="search") \
.search("match", title="python") \
.search(~Q("match", description="beta"))
.query("match", title="python") \
.query(~Q("match", description="beta"))
response = s.execute()
for hit in response:
Expand Down

0 comments on commit 213f1f8

Please sign in to comment.