karmi/tire — Issue #235: How to create an OR query?
Author: behrangsa
Created: 2012-02-07 04:17:56+00:00
State: open

When I execute the following search from the shell:

```bash
curl -XGET http://localhost:9200/documents/document/_search?q=content:Christopher
```

I get some search results.

However when I execute this:

```ruby
Tire.search 'documents' do
query do
boolean do
should { string "title:*Christopher* " }
should { string "content:*Christopher* " }
end
end
end
```

I am not getting any results. The above query converts to the following curl query by the way:

```bash
url -X GET 'http://localhost:9200/documents/_search?pretty=true' -d '{'query':
{'bool':{'should':[
{'query_string':{'query':'title:*Christopher* '}},
{'query_string':{'query':'content:*Christopher* '}}]}}}'
```

Any ideas what am I missing here?