我的对象上的自定义标识符Rails
包括正斜杠。例如,标识符可能看起来像ncsu.edu/123456789
. 当我尝试向 Solr 查询该标识符时,我将返回其中包含ncsu.edu
的任何结果。Rails 对象的元数据如下:
class IntellectualObjectMetadata < ActiveFedora::RdfxmlRDFDatastream
map_predicates do |map|
map.intellectual_object_identifier(in: RDF::DC, to: 'identifier') do |index|
index.as :stored_searchable
end
end
end
我这样查询:
IntellectualObject.where(desc_metadata__intellectual_object_identifier_tesim: params[:intellectual_object_identifier]).first
我想知道是否有人对如何标记 Solr 查询有任何提示,以便它只返回匹配整个标识符而不是部分匹配的对象。谢谢。