NumberFormatException for query field in simple_query_string

I'm getting NumberFormatException[For input string: \"AZURE\"] when validating this query. This is an issue that's popped up recently using ES 7.6.2. This doesn't make sense to me since "query" is not a field with a mapping. Any ideas?

    {:query=>
      {:bool=>
        {:must=>
          {:simple_query_string=>
            {:query=>"AZURE ",
             :default_operator=>"and",
             :fields=>
              ["num^10",
               "subject^10",
               "requirements^10",
               "set_aside",
               "groups",
               "attachments",
               "agency.*",
               "sub_agency.*",
               "contract_officer.*",
               "inbound_emails.*",
               "location.*"]}},
         :filter=>
          {:bool=>
            {:must=>
              [{:bool=>
                 {:must=>
                   [{:bool=>
                      {:should=>
                        [{:term=>{:contract_vehicle_id=>6}},
                         {:term=>{:contract_vehicle_id=>1}},
                         {:term=>{:contract_vehicle_id=>9}},
                         {:term=>{:contract_vehicle_id=>3}},
                         {:term=>{:contract_vehicle_id=>5}},
                         {:term=>{:contract_vehicle_id=>4}}]}}]}},
               {:terms=>{:prime_contract_vehicle_ids=>[3, 4, 5, 6, 7, 8, 9, 10, 2]}}]}}}}}

I'm validating the query with the validation api like this (where search data is the query posted above):

    client.perform_request(
        "GET",
        "index_name/_validate/query",
        { explain: true },
        search_data.to_json
      )

Mapping:

{"mappings"=>
    {"properties"=>
      {"agency"=>
        {"properties"=>
          {"aliases"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "alt_short_name"=>
            {"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "name"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "short_name"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}},
       "agency_id"=>{"type"=>"long"},
       "attachments"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
       "awarded"=>{"type"=>"boolean"},
       "canceled"=>{"type"=>"boolean"},
       "contract_officer"=>
        {"properties"=>
          {"email"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "email_domains"=>
            {"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "email_names"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "first_name"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "last_name"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "phone_numbers"=>
            {"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}},
       "contract_officer_id"=>{"type"=>"long"},
       "contract_vehicle_id"=>{"type"=>"long"},
       "expires_at"=>{"type"=>"date"},
       "groups"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
       "inbound_emails"=>
        {"properties"=>
          {"from"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "subject"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}},
       "location"=>
        {"properties"=>
          {"city"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "country"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "facility"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "geo"=>{"properties"=>{"lat"=>{"type"=>"float"}, "lon"=>{"type"=>"float"}}},
           "place"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "postal_code"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "region"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "street"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}},
       "mod_at"=>{"type"=>"date"},
       "num"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
       "oem_ids"=>{"type"=>"long"},
       "or_equal"=>{"type"=>"boolean"},
       "prime_contract_vehicle_ids"=>{"type"=>"long"},
       "received_at"=>{"type"=>"date"},
       "request_type"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
       "requirements"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
       "set_aside"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
       "sub_agency"=>
        {"properties"=>
          {"aliases"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "alt_short_name"=>
            {"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "name"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
           "short_name"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}}}},
       "sub_agency_id"=>{"type"=>"long"},
       "subject"=>{"type"=>"text", "fields"=>{"keyword"=>{"type"=>"keyword", "ignore_above"=>256}}},
       "viewed_by"=>{"type"=>"long"},
       "workspaces"=>
        {"properties"=>
          {"assigned"=>{"type"=>"long"},
           "disinterested"=>{"type"=>"long"},
           "following"=>{"type"=>"long"},
           "qualifying"=>{"type"=>"long"},
           "quoted"=>{"type"=>"long"},
           "submitted"=>{"type"=>"long"}}}}}}}

Works as expected (query is valid) in 7.6.0

Something was wrong with my index. Worked after moving to a new index

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.