rdfobjects-pho 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -103,13 +103,18 @@ module RDFObject
103
103
  if field["http://schemas.talis.com/2006/bigfoot/configuration#analyzer"]
104
104
  index.set_analyzer(field["http://schemas.talis.com/2006/bigfoot/configuration#analyzer"].resource)
105
105
  end
106
+ index_set << index
106
107
  end
107
108
 
108
109
  [*qp["http://schemas.talis.com/2006/bigfoot/configuration#fieldWeight"]].each do |weight|
109
110
  next unless weight
110
111
  name = weight["http://schemas.talis.com/2006/frame/schema#name"].to_s
111
112
  index = index_set.get_index(name)
112
- index.set_weight(weight["http://schemas.talis.com/2006/bigfoot/configuration#weight"])
113
+ unless index
114
+ puts "Warn: discarding #{name} - does not appear in field/predicate map."
115
+ next
116
+ end
117
+ index.set_weight(weight["http://schemas.talis.com/2006/bigfoot/configuration#weight"].value)
113
118
  end
114
119
  return index_set
115
120
  end
@@ -54,6 +54,8 @@ module RDFObject
54
54
  def set_indexes(index_set)
55
55
  index_set.set_store(@storeuri)
56
56
  put_field_predicate_map(index_set.to_fpmap)
57
+ put_query_profile(index_set.to_qp)
58
+ get_indexes
57
59
  end
58
60
 
59
61
  def get_job(uri)
@@ -78,7 +80,7 @@ module RDFObject
78
80
 
79
81
  def put_field_predicate_map(fpmap)
80
82
  if fpmap.is_a?(RDFObject::Resource)
81
- rdf = fpmap.to_rdf_object.to_xml(4)
83
+ rdf = fpmap.to_xml(4)
82
84
  elsif fpmap.is_a?(String)
83
85
  rdf = fpmap
84
86
  end
@@ -89,7 +91,7 @@ module RDFObject
89
91
 
90
92
  def put_query_profile(qp)
91
93
  if qp.is_a?(RDFObject::Resource)
92
- rdf = qp.to_rdf_object.to_xml(4)
94
+ rdf = qp.to_xml(4)
93
95
  elsif qp.is_a?(String)
94
96
  rdf = qp
95
97
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdfobjects-pho
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ross Singer