You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to index an attribute in an NtriplesRDFDatastream as a :boolean? I see from the specs that :date, :text and :integer are possible (and they work against the master branch of ActiveFedora) but :boolean seems unsupported.
module RDF
class MyRDF < Vocabulary("http://example.com/terms/")
property :has_boolean
property :number
end
end
class MyDatastream < ActiveFedora::NtriplesRDFDatastream
map_predicates do |map|
map.has_boolean(in: RDF::MyRDF) do |index|
index.type :boolean
index.as :stored_searchable
end
map.number(in: RDF::MyRDF) do |index|
index.type :integer
index.as :stored_searchable
end
end
end
class MyObject < ActiveFedora::Base
has_metadata :name=>'rdf', :type=>MyDatastream
has_attributes :has_boolean, :number, datastream: 'rdf', multiple: false
end
It may not be possible now, but you could submit that as a pull request. Otherwise, I suggest overriding #to_solr on your datastream to manually add that field to the solr document.
Is it possible to index an attribute in an NtriplesRDFDatastream as a :boolean? I see from the specs that :date, :text and :integer are possible (and they work against the master branch of ActiveFedora) but :boolean seems unsupported.
Given the above the following are true:
So far so good! But when it comes to .to_solr, things don't work for the :has_boolean column.
I cannot figure out how or why the field changes from _bsi to _tesim. Any ideas?
The text was updated successfully, but these errors were encountered: