开发者

Apache Solr and customized field filter for search

开发者 https://www.devze.com 2023-03-15 17:44 出处:网络
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 abo

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? Ca开发者_运维技巧n i define my custom function and then call it with the {!func}?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消