Skip to content

Commit

Permalink
add ontology search content types filter
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Mar 19, 2024
1 parent 4e87904 commit 7041245
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@ class SearchController < ApplicationController
query = params[:query] || params[:q]
page, page_size = page_params
ontologies = params.fetch("ontologies", "").split(',')
types = params.fetch("types", "").split(',')
qf = params.fetch("qf", "")

fq = []

fq << ontologies.map { |x| "ontology_t:\"#{x}\"" }.join(' OR ') unless ontologies.blank?
fq << types.map { |x| "type_t:\"#{x}\" OR type_txt:\"#{x}\"" }.join(' OR ') unless types.blank?


conn = SOLR::SolrConnector.new(Goo.search_conf, :ontology_data)
Expand Down

0 comments on commit 7041245

Please sign in to comment.