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 +4 -4
- data/lib/co-elastic-query.rb +2 -3
- data/lib/co-elastic-query/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 179a4d4e2b43118c16cf20b7b553b89088958932
|
|
4
|
+
data.tar.gz: b85906f9adac8e836bc3cbcb6f1a731f427e7b04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a220dd800f14e74519faf3bdb18658db8f17bc4275cff91b1614d90fb9d5affb031126e97cbbc2b4ac2c70fc3223c162adb31e9f6e6a58d74850787dce736204
|
|
7
|
+
data.tar.gz: e6dd6ad3667acd318aa8a41182404ea3bdd9a8d0e8aa0a3ae2318266b0193683c33e34c70797f67793513fdc169ff24308b74432e2e84e901ef7675b21da5122
|
data/lib/co-elastic-query.rb
CHANGED
|
@@ -122,12 +122,11 @@ class Elastic
|
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
if @search.present?
|
|
125
|
-
#
|
|
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(
|
|
129
|
+
query: '*' + @search.scan(/\S+/).join('* *') + '*'
|
|
131
130
|
}
|
|
132
131
|
},
|
|
133
132
|
filters: fieldfilters,
|
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.
|
|
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-
|
|
12
|
+
date: 2014-09-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|