bcoe / bcoe/elasticmapper

sanitize_query does not work when query is a hash

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
7
Forks
0
PR merge metrics
No merged PRs in 30d

Description

In the documentation `articles = Article.search({ "query_string" => { "query" => 'alpha' } })` possible query. I found that sometimes I ran into an error

```
NoMethodError: undefined method `gsub' for #
from /app/vendor/bundle/ruby/2.0.0/gems/elastic_mapper-0.3.0/lib/elastic_mapper/search.rb:134:in `sanitize_query'
from /app/vendor/bundle/ruby/2.0.0/gems/elastic_mapper-0.3.0/lib/elastic_mapper/search.rb:54:in `rescue in search'
from /app/vendor/bundle/ruby/2.0.0/gems/elastic_mapper-0.3.0/lib/elastic_mapper/search.rb:40:in `search'
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.