Samuele Mattiuzzo
Samuele Mattiuzzo

Reputation: 11038

Apache Solr and customized field filter for search

in my schema i have a field (salary) which is actually a string, because it can be anything (fetched from some websites): only numbers, strings, no numbers at all. Basically, anything. What i know about that field is that if there are numbers, i need to extract them, do maybe some manipulation (basic operations, actually) and use the result in my searches.

How can i accomplish that? Can i define my custom function and then call it with the {!func}?

Upvotes: 0

Views: 510

Answers (1)

fyr
fyr

Reputation: 20859

Have a look at the PatternReplaceCharFilterFactory it should be sufficient. If it is not sufficient you can implement of course a custom FilterFactory which does the job.

Upvotes: 1

Related Questions