How to exclude numeric values from ES-Index?


(Fluehmann) #1

Hey there

I'm looking for a way to remove/filter numeric values from my index.
I want to exclude values like dates or numbers..
Can this be done with an analyzer?

Thank you for your answers an suggestions.
Simon


(Mark Walkom) #2

You could do this with a custom stopwords analyser, but that will only work for new data.


(Fluehmann) #3

Hey @warkolm

Many thanks for your reply.
As it happens I really could solve the problem with an analyzer.
Therefore I defined a character filter and put into my analyzer: "char_filter": "kill_numbers".

"char_filter" : {
	"kill_numbers" : {
		"type": "pattern_replace",
		"pattern": "(\\d+)",
		"replace": ""
	}
}

Cheers
Simon


(system) #4