zaki benz
zaki benz

Reputation: 702

How to filter numeric values when indexing a text field in solr

My question is: How can I remove numeric values in text field?

Eg. "ABC COMPANY SUITE 39 165 MICHIGAN AVE LANSING MI 48909"

In order to get the folowing terms: "ABC | COMPANY | SUITE | MICHIGAN | AVE | LANSING | MI"

Upvotes: 1

Views: 1095

Answers (1)

Parvin Gasimzade
Parvin Gasimzade

Reputation: 26032

Use PatternReplaceFilterFactory.

<filter class="solr.PatternReplaceFilterFactory" pattern="([0-9])" replacement="" replace="all" />

Upvotes: 2

Related Questions