@user = current_user
end
@anded = []
@ored = []
@search_query = []
else
end
end
end
end
end
end
end
end
@anded << "repository_id: #{params[:repository_id]}"
end
end
@anded << search_params.delete(search_params.first)
@anded = @anded.join(' AND ')
if search_params.present?
@ored = search_params.join(' OR ')
@search_query = @anded + ' AND (' + @ored + ')'
end
@search_query = @anded
elsif params[:query].present? && !in_repository
@search_query = params[:query].split(' ').join(' OR ')
else
@search_query = @anded.join(' AND ')
end
end
end