0

I am working with Elastic Search on Azure.

In my elastic index I have the following document:

       {                  
                "minimumwidth": 30,
                "minimumheight": 60,
                "maximumwidth": 62,
                "maximumheight": 145,                  
            }

If I perform the following query I receive zero results:

{
    "size": 200,
    "query": {
        "bool": {
            "must": [
                {
                    "range": {
                        "maximumheight": {
                            "gte": 80
                        }
                    }
                }             
            ]
        }
    }
    
}

The result should be returned since the 145 > 80!

If change the document so that the maximumheight value is less than 100:

            {                  
                "minimumwidth": 30,
                "minimumheight": 60,
                "maximumwidth": 62,
                "maximumheight": 99,                  
            }

The record gets returned as expected.

There seems to be something weird going on when we set the maximumheight value to anything above 100.

Anyone know what is causing this and why elastic doesn't like a value over 100?

Michael Edwards
  • 6,308
  • 6
  • 44
  • 75

1 Answers1

0

It looks like the field was originally setup as a string property and not a numeric which is causing these range issues.

Michael Edwards
  • 6,308
  • 6
  • 44
  • 75