stretcher 1.20.0.beta1 → 1.20.0.beta2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81f2f9ec0ad54ee0611402adab9de910c69c7add
|
4
|
+
data.tar.gz: dd0776a032dc17bce10cb15d44a66435f19f6ee1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2173de91fa8f0e1322aa6a0e5b7718b6cbd6005dd237250967773f567ba2cb841626fb8b5251dc1d25034ee7163e22fc309ea07762455673b5625d7e9110a322
|
7
|
+
data.tar.gz: 2c69f1f1f583985b4b7bb1c7c36664ceb5937c2ea5656bbaf6a5a34c22f2aa0c3e9e786f84c992f98bc77364beee865effa24452f65d1ac3700599d760335870
|
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'hashie/dash'
|
2
1
|
module Stretcher
|
3
2
|
# Conveniently represents elastic search results in a more compact fashion
|
4
3
|
#
|
@@ -35,7 +34,7 @@ module Stretcher
|
|
35
34
|
# DEPRECATED!
|
36
35
|
# Call #documents instead!
|
37
36
|
def results
|
38
|
-
|
37
|
+
documents
|
39
38
|
end
|
40
39
|
|
41
40
|
# Returns a 'prettier' version of elasticsearch results
|
@@ -45,7 +44,7 @@ module Stretcher
|
|
45
44
|
# 2. Merge any keys beginning with a '_' into it as well (such as '_score')
|
46
45
|
# 3. Copy the 'highlight' field into '_highlight'
|
47
46
|
#
|
48
|
-
def
|
47
|
+
def documents
|
49
48
|
# This function and its helpers are side-effecty for speed
|
50
49
|
@documents ||= raw[:hits][:hits].map do |hit|
|
51
50
|
doc = extract_source(hit)
|
data/lib/stretcher/version.rb
CHANGED
@@ -45,8 +45,8 @@ describe Stretcher::IndexType do
|
|
45
45
|
|
46
46
|
it "should add _highlight field to resulting documents when present" do
|
47
47
|
res = type.search(:query => {:match => {:message => 'hello'}}, :highlight => {:fields => {:message => {}}})
|
48
|
-
res.
|
49
|
-
res.
|
48
|
+
res.documents.first.message.should == @doc[:message]
|
49
|
+
res.documents.first.should have_key '_highlight'
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stretcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.20.0.
|
4
|
+
version: 1.20.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Cholakian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|