inquisitio 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -23
- data/README.md +2 -1
- data/lib/inquisitio/search_url_builder.rb +3 -3
- data/lib/inquisitio/version.rb +1 -1
- data/test/search_url_builder_test.rb +10 -3
- 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: a82ff5d2d9e82c66a70e7f562fe341dbcf801132
|
4
|
+
data.tar.gz: 001c23a1eb0cc0bda0312c5b0e750823c9de5ef1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86d076089e49f4312e987ed5fb3aaa89a90eb998b5bcf6c95057ca240577de82b86b9092bb51a80ad56f7c2954e826d73ae364d7ae784424064434fe97e0388c
|
7
|
+
data.tar.gz: d3d5df92f1a49fa3fbe43c43a104966d16cd88eacf856f910c2352cf3665f428c566fa0ceb50c0ad9c9f90911a9f18dba0b7e0144c2abae949f99598e203b8ff
|
data/CHANGELOG.md
CHANGED
@@ -1,97 +1,77 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.2 / 2014-03-20
|
2
|
+
[BUGFIX] Encode ampersands
|
2
3
|
|
4
|
+
1.1.1 / 2014-01-25
|
3
5
|
[BUGFIX] Sort records into result order before returning
|
4
6
|
|
5
7
|
1.1.0 / 2014-01-24
|
6
|
-
|
7
8
|
[BUGFIX] Use 'type' and 'id' fields instead of deprecated med_ fields
|
8
9
|
|
9
10
|
0.2.0 / 2014-01-14
|
10
|
-
|
11
11
|
[FEATURE] Add support for retrying query
|
12
12
|
|
13
13
|
0.1.7 / 2013-12-13
|
14
|
-
|
15
14
|
[FEATURE] Added dry-run configuration option to prevent data being sent to
|
16
15
|
CloudSearch when indexing.
|
17
16
|
|
18
17
|
0.1.6 / 2013-11-05
|
19
|
-
|
20
18
|
[BUGFIX] Correctly ignore nil fields when indexing.
|
21
19
|
|
22
20
|
0.1.5 / 2013-11-05
|
23
|
-
|
24
21
|
[FEATURE] Ignore nil fields when indexing.
|
25
22
|
|
26
23
|
0.1.4 / 2013-11-05
|
27
|
-
|
28
24
|
[FEATURE] Added logging when indexing.
|
29
25
|
|
30
26
|
0.1.3 / 2013-10-31
|
31
|
-
|
32
27
|
[BUGFIX] Fix namespacing issue with ActiveSupport::String
|
33
28
|
|
34
29
|
0.1.2 / 2013-10-30
|
35
|
-
|
36
30
|
[BUGFIX] Convert EXCON ERROR to Inquisitio Error
|
37
31
|
|
38
32
|
0.1.1 / 2013-10-29
|
39
|
-
|
40
33
|
[FEATURE] Add pagination methods to match Kaminari
|
41
34
|
|
42
35
|
0.1.0 / 2013-10-28
|
43
|
-
|
44
36
|
[BUGFIX] Parse ids properly.
|
45
37
|
|
46
38
|
0.0.13 / 2013-10-28
|
47
|
-
|
48
39
|
[FEATURE] Implement Searcher#records
|
49
40
|
[FEATURE] Implement Searcher#ids
|
50
41
|
[FEATURE] Allow for Array-style method iteration
|
51
42
|
[FEATURE] Changed syntax to match ActiveRecord style.
|
52
43
|
|
53
44
|
0.0.12 / 2013-10-24
|
54
|
-
|
55
45
|
[FEATURE] Allow filter values to be arrays.
|
56
46
|
|
57
47
|
0.0.12 / 2013-10-24
|
58
|
-
|
59
48
|
[FEATURE] Searcher now has default size read from configuration.
|
60
49
|
[FEATURE] Searcher now performs simple sanatization of search queries.
|
61
50
|
|
62
51
|
0.0.9 / Unreleased
|
63
|
-
|
64
52
|
[FEATURE] Searcher now has id, records and results.
|
65
53
|
[FEATURE] Refactor SearchUrlBuilder out of Searcher.
|
66
54
|
|
67
55
|
0.0.8 / 2013-10-23
|
68
|
-
|
69
56
|
[FEATURE] Extended searcher to handle arguments (for example, facet arguments).
|
70
57
|
|
71
58
|
0.0.7 / 2013-10-23
|
72
|
-
|
73
59
|
[FEATURE] Extended searcher to handle boolean queries.
|
74
60
|
|
75
61
|
0.0.6 / 2013-10-23
|
76
|
-
|
77
62
|
[FEATURE] Changed version of excon
|
78
63
|
|
79
64
|
0.0.5 / 2013-10-22
|
80
|
-
|
81
65
|
[FEATURE] Initial indexer created.
|
82
66
|
|
83
67
|
0.0.4 / 2013-10-22
|
84
|
-
|
85
68
|
[FEATURE] Return_fields is now optional in search call.
|
86
69
|
|
87
70
|
0.0.3 / 2013-10-21
|
88
|
-
|
89
71
|
[FEATURE] Added ability to perform search using Searcher class.
|
90
72
|
|
91
73
|
0.0.2 / 2013-10-21
|
92
|
-
|
93
74
|
[FEATURE] Added Document class representing AWS SDF document.
|
94
75
|
|
95
76
|
0.0.1 / 2013-10-21
|
96
|
-
|
97
77
|
[FEATURE] Added configuration, logger and error classes.
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[![Dependencies](https://gemnasium.com/meducation/inquisitio.png?travis)](https://gemnasium.com/meducation/inquisitio)
|
5
5
|
[![Code Climate](https://codeclimate.com/github/meducation/inquisitio.png)](https://codeclimate.com/github/meducation/inquisitio)
|
6
6
|
|
7
|
-
Inquisitio is a ruby wrapper around Amazon Cloud Search.
|
7
|
+
Inquisitio is a ruby wrapper around Amazon Cloud Search.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -42,6 +42,7 @@ These individuals have come up with the ideas and written the code that made thi
|
|
42
42
|
- [Jeremy Walker](http://github.com/iHID)
|
43
43
|
- [Malcolm Landon](http://github.com/malcyL)
|
44
44
|
- [Charles Care](http://github.com/ccare)
|
45
|
+
- [Rob Styles](http://github.com/mmmmmrob)
|
45
46
|
|
46
47
|
## Licence
|
47
48
|
|
@@ -24,7 +24,7 @@ module Inquisitio
|
|
24
24
|
|
25
25
|
private
|
26
26
|
def simple_query
|
27
|
-
"q=#{URI.encode(@query.first.gsub('
|
27
|
+
"q=#{URI.encode(sanitise(@query.first)).gsub('&', '%26')}"
|
28
28
|
end
|
29
29
|
|
30
30
|
def boolean_query
|
@@ -49,11 +49,11 @@ module Inquisitio
|
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
"bq=#{URI.encode("(and #{query_blocks.join(' ')})")}"
|
52
|
+
"bq=#{URI.encode("(and #{query_blocks.join(' ')})").gsub('&', '%26')}"
|
53
53
|
end
|
54
54
|
|
55
55
|
def sanitise(value)
|
56
|
-
value.to_s.gsub('\'','')
|
56
|
+
value.to_s.gsub('\'','')
|
57
57
|
end
|
58
58
|
|
59
59
|
def return_fields_query_string
|
data/lib/inquisitio/version.rb
CHANGED
@@ -15,18 +15,25 @@ module Inquisitio
|
|
15
15
|
assert_equal expected_url, url
|
16
16
|
end
|
17
17
|
|
18
|
+
def test_create_correct_search_url_with_ampersand
|
19
|
+
url = SearchUrlBuilder.build(query: ['Star&Wars'])
|
20
|
+
expected_url = 'http://my.search-endpoint.com/2011-02-01/search?q=Star%26Wars&size=10'
|
21
|
+
assert_equal expected_url, url
|
22
|
+
end
|
23
|
+
|
18
24
|
def test_create_correct_search_url_with_multiple_criteria_should_create_boolean_query
|
19
25
|
url = SearchUrlBuilder.build(query: ['Star Wars', 'Episode One'])
|
20
26
|
expected_url = 'http://my.search-endpoint.com/2011-02-01/search?bq=(and%20(or%20\'Star%20Wars\'%20\'Episode%20One\'))&size=10'
|
21
27
|
assert_equal expected_url, url
|
22
28
|
end
|
23
29
|
|
24
|
-
def
|
25
|
-
url = SearchUrlBuilder.build(query: ['Star
|
26
|
-
expected_url = 'http://my.search-endpoint.com/2011-02-01/search?
|
30
|
+
def test_create_correct_search_url_with_multiple_criteria_with_ampersand
|
31
|
+
url = SearchUrlBuilder.build(query: ['Star&Wars', 'Episode One'])
|
32
|
+
expected_url = 'http://my.search-endpoint.com/2011-02-01/search?bq=(and%20(or%20\'Star%26Wars\'%20\'Episode%20One\'))&size=10'
|
27
33
|
assert_equal expected_url, url
|
28
34
|
end
|
29
35
|
|
36
|
+
|
30
37
|
def test_create_correct_search_url_including_return_fields
|
31
38
|
url = SearchUrlBuilder.build(query: ['Star Wars'], return_fields: [ 'title', 'year', '%' ] )
|
32
39
|
expected_url = 'http://my.search-endpoint.com/2011-02-01/search?q=Star%20Wars&return-fields=title,year,%25&size=10'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inquisitio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Walker
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-03-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: excon
|