infopark_fiona_connector 7.0.1.5.2.3.rc4 → 7.0.1.5.2.3.rc5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/cms_controller.rb +1 -1
- data/app/controllers/rails_connector/default_cms_controller.rb +0 -2
- data/app/helpers/cms_helper.rb +1 -1
- data/app/helpers/cms_routing_helper.rb +1 -1
- data/app/helpers/rails_connector/cms_asset_helper.rb +4 -5
- data/app/helpers/rails_connector/cms_tag_helper.rb +0 -3
- data/app/helpers/rails_connector/default_cms_helper.rb +0 -2
- data/app/helpers/rails_connector/default_cms_routing_helper.rb +15 -16
- data/app/helpers/rails_connector/display_helper.rb +31 -33
- data/app/helpers/rails_connector/editing_helper.rb +2 -8
- data/app/helpers/rails_connector/layout_helper.rb +2 -5
- data/app/helpers/rails_connector/marker_helper.rb +63 -64
- data/app/helpers/rails_connector/table_of_contents_helper.rb +1 -3
- data/config/cms_routes.rb +15 -15
- data/lib/gem_dependencies.rb +8 -7
- data/lib/generators/rails_connector/install/install_generator.rb +6 -6
- data/lib/generators/rails_connector/install/templates/initializers/rails_connector.rb +1 -1
- data/lib/infopark_fiona_connector.rb +9 -9
- data/lib/rails_connector/attr_dict.rb +26 -18
- data/lib/rails_connector/attribute.rb +18 -21
- data/lib/rails_connector/authenticable.rb +12 -5
- data/lib/rails_connector/basic_obj.rb +64 -57
- data/lib/rails_connector/blob.rb +2 -5
- data/lib/rails_connector/blob_mapping.rb +2 -3
- data/lib/rails_connector/blob_mysql.rb +3 -5
- data/lib/rails_connector/blob_oracle.rb +5 -7
- data/lib/rails_connector/channel.rb +5 -6
- data/lib/rails_connector/cms_accessible.rb +16 -17
- data/lib/rails_connector/cms_base_model.rb +2 -4
- data/lib/rails_connector/cms_dispatch_controller.rb +3 -6
- data/lib/rails_connector/cms_env.rb +4 -7
- data/lib/rails_connector/cms_test_request.rb +1 -1
- data/lib/rails_connector/configuration.rb +12 -16
- data/lib/rails_connector/content.rb +0 -4
- data/lib/rails_connector/core_extensions/time.rb +3 -4
- data/lib/rails_connector/date_attribute.rb +1 -3
- data/lib/rails_connector/default_search_request.rb +1 -1
- data/lib/rails_connector/engine.rb +18 -21
- data/lib/rails_connector/errors.rb +2 -5
- data/lib/rails_connector/fiona_datetime.rb +2 -2
- data/lib/rails_connector/fiona_engine.rb +3 -4
- data/lib/rails_connector/html_string.rb +0 -2
- data/lib/rails_connector/job.rb +0 -3
- data/lib/rails_connector/link.rb +7 -4
- data/lib/rails_connector/link_list.rb +1 -5
- data/lib/rails_connector/link_resolvable.rb +1 -5
- data/lib/rails_connector/lucene_search_request.rb +20 -24
- data/lib/rails_connector/markdown_string.rb +0 -2
- data/lib/rails_connector/meta.rb +25 -30
- data/lib/rails_connector/meta/eager_loader.rb +14 -12
- data/lib/rails_connector/named_link.rb +12 -16
- data/lib/rails_connector/news.rb +3 -3
- data/lib/rails_connector/obj_class.rb +23 -25
- data/lib/rails_connector/obj_class_attr.rb +1 -1
- data/lib/rails_connector/object_with_meta_data.rb +0 -5
- data/lib/rails_connector/permission.rb +2 -6
- data/lib/rails_connector/ses.rb +3 -8
- data/lib/rails_connector/ses/verity_accessor.rb +43 -46
- data/lib/rails_connector/string_tagging.rb +0 -3
- data/lib/rails_connector/verity_search_request.rb +6 -9
- data/lib/search_request.rb +1 -1
- data/lib/version.rb +1 -1
- metadata +2 -2
@@ -1,6 +1,4 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
module RailsConnector
|
3
|
-
|
4
2
|
# This class provides an implementation for accessing the Verity based search server.
|
5
3
|
# It should be customized by subclassing.
|
6
4
|
# @api public
|
@@ -24,7 +22,7 @@ module RailsConnector
|
|
24
22
|
# <tt>:collections</tt>:: The collections to be searched, default: <tt>['cm-contents']</tt>
|
25
23
|
# <tt>:base_query</tt>:: The VQL base query, default: <tt>nil</tt>
|
26
24
|
# @api public
|
27
|
-
def initialize(query_string, options=nil)
|
25
|
+
def initialize(query_string, options = nil)
|
28
26
|
@query_string = self.class.sanitize(query_string)
|
29
27
|
@options = Configuration.search_options.merge(options || {})
|
30
28
|
end
|
@@ -34,15 +32,15 @@ module RailsConnector
|
|
34
32
|
# Uses the #base_query and +options+ given in #new.
|
35
33
|
# @api public
|
36
34
|
def fetch_hits
|
37
|
-
SES::VerityAccessor.new(vql_query_for(@query_string), {:base_query
|
35
|
+
SES::VerityAccessor.new(vql_query_for(@query_string), { base_query: base_query }.merge(@options)).search
|
38
36
|
end
|
39
37
|
|
40
38
|
# Removes unwanted characters from +text+.
|
41
39
|
def self.sanitize(text)
|
42
|
-
text.strip.gsub(/[<>"'´`,()\[\]{}=!@\\]/,
|
40
|
+
text.strip.gsub(/[<>"'´`,()\[\]{}=!@\\]/, "")
|
43
41
|
end
|
44
42
|
|
45
|
-
def vql_query_for(query_string =
|
43
|
+
def vql_query_for(query_string = "")
|
46
44
|
words = query_string.split(/\s+/).map do |word|
|
47
45
|
word unless %w(and or not).include?(word.downcase)
|
48
46
|
end.compact.join(", ")
|
@@ -54,7 +52,7 @@ module RailsConnector
|
|
54
52
|
# A base query is used to reduce the number of documents before executing the actual query.
|
55
53
|
# By default, all base query conditions must be met, they are combined using the +AND+ operator.
|
56
54
|
def base_query
|
57
|
-
"<#AND> (#{base_query_conditions.values.compact.join(
|
55
|
+
"<#AND> (#{base_query_conditions.values.compact.join(", ")})"
|
58
56
|
end
|
59
57
|
|
60
58
|
# A hash of conditions, combined to a base query by #base_query.
|
@@ -78,12 +76,11 @@ module RailsConnector
|
|
78
76
|
conditions[:content] = '("released" <#IN> state)'
|
79
77
|
conditions[:suppressExport] = '("0" <#IN> suppressExport)'
|
80
78
|
conditions[:validFrom] = "(validFrom < #{Time.now.to_iso})"
|
81
|
-
conditions[:validUntil] =
|
79
|
+
conditions[:validUntil] = %!<#OR> (
|
82
80
|
(validUntil = ""),
|
83
81
|
(validUntil > #{Time.now.to_iso})
|
84
82
|
)!
|
85
83
|
conditions
|
86
84
|
end
|
87
85
|
end
|
88
|
-
|
89
86
|
end
|
data/lib/search_request.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
class SearchRequest < RailsConnector::DefaultSearchRequest
|
2
|
-
end
|
2
|
+
end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_fiona_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.1.5.2.3.
|
4
|
+
version: 7.0.1.5.2.3.rc5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Infopark AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|