qiita-elasticsearch 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 614b2c428b1eb922506b09d41afc4998765884f5
4
- data.tar.gz: f8d94fb3a78d32af62f4a74665820aa5d4df606a
3
+ metadata.gz: c85be5babc5ed5cefb8af6487087d0612347eaee
4
+ data.tar.gz: 73a5134cf3385b9e1616faebb4cace348b46313a
5
5
  SHA512:
6
- metadata.gz: 94653907b57633b244b66101b2a51f41144875862b7da6eb3511c42a0d006fcd60032d16ec532493638da1f5c5372fbd5f4209780dd35b2f38392faefe5fe6f2
7
- data.tar.gz: 6d6ec21e7cf0f5748a578c698a82593cc1994ad5d68cf9a18b591bcfa1d60c7de00bc58d590e2bbb24eada56d06e1793be0f56ef6aee515c550647879f076940
6
+ metadata.gz: 12222f5696ef38b2afd9b27a0959b965da581deba85bc6b3272cf47d344daf9afa6c2b0fa20b4f9b8b9e82691838a06f4cc8a0805668650a8b8ee16e32bfb922
7
+ data.tar.gz: 45d3786363ac701876d52f74679611e028e7a1ad1276f74fa0aca2a94226ff11976cb113627bf602c6854b7f2f2d4fbdbee120958fae1ed6fcc802a33d204abb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.1.4
2
+ - Use downcased term for term and prefix on filtered query
3
+
1
4
  ## 0.1.3
2
5
  - Fix bug on negative token with field name
3
6
 
@@ -20,12 +20,12 @@ module Qiita
20
20
  "should" => [
21
21
  {
22
22
  "prefix" => {
23
- @token.field_name => @token.term + "/",
23
+ @token.field_name => @token.downcased_term + "/",
24
24
  },
25
25
  },
26
26
  {
27
27
  "term" => {
28
- @token.field_name => @token.term,
28
+ @token.field_name => @token.downcased_term,
29
29
  },
30
30
  },
31
31
  ],
@@ -41,7 +41,7 @@ module Qiita
41
41
  "filtered" => {
42
42
  "filter" => {
43
43
  "term" => {
44
- @token.field_name => @token.term,
44
+ @token.field_name => @token.downcased_term,
45
45
  },
46
46
  },
47
47
  "query" => {
@@ -11,6 +11,10 @@ module Qiita
11
11
  @token_string = token_string
12
12
  end
13
13
 
14
+ def downcased_term
15
+ @downcased_term ||= term.downcase
16
+ end
17
+
14
18
  def must?
15
19
  !field_name.nil? && !negative?
16
20
  end
@@ -1,5 +1,5 @@
1
1
  module Qiita
2
2
  module Elasticsearch
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-16 00:00:00.000000000 Z
11
+ date: 2015-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler