Limit int size


(Muhamadli302) #1

Hi,

I'm using ES 1.7, and I want to be able to limit my int fields.
For example, I have a field that represents percentages. So I want the value to be 0-100. If the value is not in that range, then ES should have null/not insert anything.

Is there's a way to do this with ES, or should I find a way to "fix" the index once all the data is inserted? (BTW, I'm using elasticsearch-py to insert the data)

Thanks!


(Olivier Van Dam) #2

I haven't seen a way to do what you describe,
but as you're using elasticsearch-py, wouldn't it be easier to test the fields and remove them from the event if they don't match your criteria prior to insertion?


(Muhamadli302) #3

Yeah after further reading I figured this is what I'll probably do. Thanks!


(system) #4