app/openbel/api/helpers/filters.rb
def invalid_fts_filters(filters)
      filters.select { |filter|
        category, name, value = filter.values_at('category', 'name', 'value')
        category == 'fts' && name == 'search' && value.to_s.length <= 1
      }.map { |invalid_fts_filter|
        error = <<-MSG.gsub(/^\s+/, '').strip
          Full-text search filter values must be larger than one.
        MSG
        invalid_fts_filter.merge(:error => error)
      }
    end
def invalid_fts_filters(filters)
      filters.select { |filter|
        category, name, value = filter.values_at('category', 'name', 'value')
        category == 'fts' && name == 'search' && value.to_s.length <= 1
      }.map { |invalid_fts_filter|
        error = <<-MSG.gsub(/^\s+/, '').strip
          Full-text search filter values must be larger than one.
        MSG
        invalid_fts_filter.merge(:error => error)
      }
    end
Retrieve the filters that represent invalid full-text search values.

 The parsed, invalid full-text search filters will contain an +:error+ key
 that provides an error message intended for the user.

 @param [Array<Hash>] filters an array of filter {Hash hashes}
 @return [Array<Hash>] an array of invalid full-text search filter
         {Hash hashes} that contain a human-readable error at the
         +:error+ key