Skip to content

Commit

Permalink
Clean up notes,
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Dec 19, 2024
1 parent e0ff5c5 commit f480bf3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/classes/pattern_search/name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def model
def build_query
super

# Temporary hack to get include_subtaxa/synonyms to work.
# NOTE: this affects the index title. Let's keep it
# This converts any search that *looks like* a name search into
# an actual name search. NOTE: This affects the index title.
return unless args[:include_subtaxa].present? ||
args[:include_synonyms].present?

Expand Down
4 changes: 2 additions & 2 deletions app/classes/query/image_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def parameter_declarations
by_user?: User,
users?: [User],
locations?: [:string],
outer?: :query, # for images inside observations
observation?: Observation, # for images inside observations
observations?: [Observation],
project?: Project,
Expand All @@ -34,8 +35,7 @@ def parameter_declarations
quality?: [:float],
confidence?: [:float],
ok_for_export?: :boolean,
pattern?: :string,
outer?: :query # for images inside observations
pattern?: :string
).merge(names_parameter_declarations)
end

Expand Down
1 change: 1 addition & 0 deletions app/classes/query/initializers/advanced_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module Initializers
module AdvancedSearch
# NOTE: The autocomplaters for name, location, and user all make the ids
# available now, so this could be a lot more efficient.
# But sometimes you're looking for strings that aren't ids.
def advanced_search_parameter_declarations
{
name?: :string,
Expand Down

0 comments on commit f480bf3

Please sign in to comment.