ontology_search.rb revision 0d0e4218821cf9a40977197eebcb9eafbc6a7989
require 'json'
#
# Beware! This is not tested well.
#
@limit = 20
end
end
end
unless repository.ontologies.where("name = :prefix", prefix: prefix, repository_id: repository).empty?
end
repository.ontologies.select(:name).where("name ILIKE :prefix", prefix: "#{prefix}%").group("name").limit(5).each do |ontology|
end
end
end
end
end
end
text_list.to_a.sort.map { |x| {text: x} }
end
end
#text_list.add(prefix)
end
Ontology.select(:name).where("name ILIKE :prefix", prefix: "#{prefix}%").group("name").limit(5).each do |ontology|
end
Entity.select("display_name").where("display_name ILIKE :prefix", prefix: "#{prefix}%").group("display_name").limit(5).each do |symbol|
end
Entity.select("name").where("name ILIKE :prefix", prefix: "#{prefix}%").group("name").limit(5).each do |symbol|
end
Entity.select("text").where("text ILIKE :prefix", prefix: "#{prefix}%").group("text").limit(5).each do |symbol|
end
if logic.ontologies.size != 0
end
end
text_list.to_a.sort.map { |x| {text: x} }
end
end
end
end
{
resultsInPage: 20,
}
end
{
page: 0,
resultsInPage: 50,
resultsInSet: 0,
}
end
end
end
end