qiita-elasticsearch 0.2.0 → 0.2.1
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/CHANGELOG.md +3 -0
- data/README.md +3 -3
- data/lib/qiita/elasticsearch/nodes/filter_node.rb +2 -2
- data/lib/qiita/elasticsearch/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: 8560c892e6ef0e111e0a382d6d194b93eed3fb82
|
4
|
+
data.tar.gz: c7fde536c988141b2550462cac74a38419b8933c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4835e6a0299c1dc4e930b347e26854763a1e5e968488a91db46e40b773acc6ebb0472d21103c8c9e9cec460ee9f6f31e8553149068dc98a2e09aa3896ccc0b90
|
7
|
+
data.tar.gz: 074d7ecd0a00f12fea0513bae0a875aa6b554c46c2a3d8d0cabe6c691ba92d0ace07e43ef41d5f846d56ca01194746014305ddbdf44922aaa30c616e40edf271
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -53,13 +53,13 @@ query_builder.build("user:a b")
|
|
53
53
|
```
|
54
54
|
|
55
55
|
### hierarchal_fields
|
56
|
-
Pass `:hierarchal_fields` options with `:
|
56
|
+
Pass `:hierarchal_fields` options with `:filterable_fields` to enable prefixed filtered queries.
|
57
57
|
With this option, `tag:foo` will hit documents tagged with `foo`, or `foo/...`.
|
58
58
|
|
59
59
|
```rb
|
60
60
|
query_builder = Qiita::Elasticsearch::QueryBuilder.new(filterable_fields: ["tag"], hierarchal_fields: ["tag"])
|
61
|
-
|
61
|
+
#=> #<Qiita::Elasticsearch::QueryBuilder:0x007fe96d6d5ed0 @filterable_fields=["tag"], @hierarchal_fields=["tag"], @matchable_fields=nil>
|
62
62
|
|
63
63
|
query_builder.build("tag:ruby")
|
64
|
-
|
64
|
+
#=> {"filtered"=>{"filter"=>{"bool"=>{"should"=>[{"prefix"=>{"tag"=>"ruby/"}}, {"term"=>{"tag"=>"ruby"}}]}}}}
|
65
65
|
```
|
@@ -22,12 +22,12 @@ module Qiita
|
|
22
22
|
).to_hash
|
23
23
|
else
|
24
24
|
{
|
25
|
-
"_cache" => true,
|
26
25
|
"bool" => {
|
26
|
+
"_cache" => true,
|
27
27
|
"must" => must_queries,
|
28
28
|
"must_not" => must_not_queries,
|
29
29
|
}.reject do |key, value|
|
30
|
-
value.empty?
|
30
|
+
value.is_a?(Array) && value.empty?
|
31
31
|
end,
|
32
32
|
}
|
33
33
|
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.2.
|
4
|
+
version: 0.2.1
|
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-
|
11
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|