Can someone tell me what's wrong with this query


(Dave K) #1

Hi,

I'm trying to run the following query through Chrome Sense.

GET _search
{
  "query": {
    "constant_score": {
      "filter": {
        "bool": {
          "must": [
            {
              "term": {
                "city": "CHANTILLY"
              }
            }
          ],
          "must_not": {
            "term": {
              "isportauthority": "Y"
            }
          }
        }
      }
    }
  }
} 

It gives me the following error:

{
   "statusCode": 400,
   "error": "Bad Request",
   "message": "child \"uri\" fails because [\"uri\" must be a valid uri]",
   "validation": {
      "source": "query",
      "keys": [
         "uri"
      ]
   }
}

I copied the query format directly from the "...definitive guide" so I would get the syntax correct. I haven't a clue. Help!

Thanks,
Dave K


(Nik Everett) #2

Can you try switching from GET to POST? What system is giving you that error message? It looks kind of like an Elasticsearch error message but I don't recognize it.


(Dave K) #3

I'm submitting the query with Chrome Sense. I want to GET data not POST it. Just tried a POST and got identical results.

Thanks
Dave K


(system) #4

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