Slicer issue when using search on integer fields


#1

Hello, I’m using a slicer with an integer field and when i’m using the text search in the column header i get this exception:


#2

Hey @mdemian it seems like you are using an Elasticsearch provider, to remove the exception you have to delete the text in the text serach field, but, the solution here is changing your mappings in the elasticsearch source and create a multi-field, that will contain a number field and also a string for searching, something like this:

PUT /sales_source/items/_mapping
{
  "items" : {
    "properties" : {
      "quantity_shipped" : {
        "type" : "multi_field",
          "fields" : {
            "numeric" : {
              "type" : "integer",
              "index" : "not_analyzed"
            },
            "text" : {
              "type" : "string",
              "index" : "analyzed"
            }
          }
        }
      }
    }
}

#3

Got it, but i have a big data source, so, I think doing this could be a problem


#4

I see, actually, you can also use the range filter instead, it allows you to apply a filter using a range of numbers and I think it is more apropiate for this case


#5

I see, well i think you have the reason, using a range filter makes sense, I’ll see what i can do, thanks for your help