co-elastic-query 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68ef853b38f5e3752ae82f245326cf99f331e1e4
4
- data.tar.gz: 46dd06a05d563613e4ef26298c3f81488e802b48
3
+ metadata.gz: 179a4d4e2b43118c16cf20b7b553b89088958932
4
+ data.tar.gz: b85906f9adac8e836bc3cbcb6f1a731f427e7b04
5
5
  SHA512:
6
- metadata.gz: f009e914e70254347d8e0fea7b954fe4365176b9941cfdcf3f2288bc5054c8bd61b3de232f9ffdafa0c7dbbb931a3c4bb3e90fe2679c045c62309f7c63580ea8
7
- data.tar.gz: 08a6998306551b5d9e51409f2e6fbbd09a90088817643064a0ffce304b6f45b3579e04b04bc4ab860fc2813d05b19834576fca86c59820f35032762af724e572
6
+ metadata.gz: a220dd800f14e74519faf3bdb18658db8f17bc4275cff91b1614d90fb9d5affb031126e97cbbc2b4ac2c70fc3223c162adb31e9f6e6a58d74850787dce736204
7
+ data.tar.gz: e6dd6ad3667acd318aa8a41182404ea3bdd9a8d0e8aa0a3ae2318266b0193683c33e34c70797f67793513fdc169ff24308b74432e2e84e901ef7675b21da5122
@@ -122,12 +122,11 @@ class Elastic
122
122
  end
123
123
 
124
124
  if @search.present?
125
- # HACK:: This is such a hack.
126
- # TODO:: join('* ') + '*' (i.e fix ES tokeniser and then match start of words)
125
+ # Break the terms up purely on whitespace
127
126
  {
128
127
  query: {
129
128
  query_string: {
130
- query: '*' + @search.scan(/[a-zA-Z0-9]+/).join('* *') + '*'
129
+ query: '*' + @search.scan(/\S+/).join('* *') + '*'
131
130
  }
132
131
  },
133
132
  filters: fieldfilters,
@@ -1,3 +1,3 @@
1
1
  module CoElasticQuery
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: co-elastic-query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen von Takach
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-26 00:00:00.000000000 Z
12
+ date: 2014-09-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler