How to exclude numeric values from ES-Index?

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

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

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

1 Like