cncflora_commons 0.0.37 → 0.0.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/cncflora_commons.rb +2 -1
  2. metadata +1 -1
@@ -62,8 +62,9 @@ end
62
62
 
63
63
  def search(db,index,query)
64
64
  query="scientificName:'Aphelandra longiflora'" unless query != nil && query.length > 0
65
+ query_json={"query"=>{"query_string"=>{"query"=>query}}}
65
66
  result = []
66
- r = http_get("#{settings.elasticsearch}/#{db}/#{index}/_search?size=999&q=#{URI.encode(query)}")
67
+ r = http_post("#{settings.elasticsearch}/#{db}/#{index}/_search?size=999",query_json)
67
68
  if r['hits'] && r['hits']['hits'] then
68
69
  r['hits']['hits'].each{|hit|
69
70
  result.push(hit["_source"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cncflora_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.37
4
+ version: 0.0.38
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: