diff --git a/lib/search_query_builder.rb b/lib/search_query_builder.rb index 0a34ce7..258faad 100644 --- a/lib/search_query_builder.rb +++ b/lib/search_query_builder.rb @@ -216,7 +216,9 @@ def self.both(field) FieldData.new(:string, both('stripped_text'), %w[text x], 'The text of a card, stripped of all formatting symbols and marks.'), FieldData.new(:string, both('stripped_title'), %w[title _], - 'The title of a card, stripped of all formatting symbols and marks.') + 'The title of a card, stripped of all formatting symbols and marks.'), + FieldData.new(:string, both('id'), %w[id], + 'The string id for this type.') ] # rubocop:enable Layout/LineLength def self.search_filter_docs @@ -324,7 +326,7 @@ def initialize(query) end # Generate SQL query and parameters from AST - # This has the side effect of adding the SQL parameters to @where_values + # This has the side effect of adding the SQL parameters to @whereues @where_values = [] # TODO(plural): Capture any exceptions in here and return them as well formatted errors. @where = transform.apply(@parse_tree).construct_clause(@where_values, fields) @@ -462,7 +464,7 @@ def construct_clause(parameters, context) # Booleans when :boolean - unless %w[true false t f 1 0].include?(value) + unless %w[true false t f 1 0 any].include?(value) raise format('Invalid value "%s" for boolean field "%s"', value:, field: context.keyword) end