Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solr search facets name with regular expression

Tags:

regex

solr

I wanted to filter facets name based on regular expression. I have an idea of facet.prefix element and im expecting an similar feature to find facets by providing keywords that can be somewhere in between the whole work.

example :- facets country["united states","west indies","india"]. required feature: search all facets name containing "ind" keyword. resulting "west indies" and "india".

like image 714
Kumar Kailash Avatar asked Feb 12 '14 11:02

Kumar Kailash


1 Answers

(?<=")[a-zA-z -]*ind[a-zA-z -]*(?=") will do it for you, dont know what sort of exceptions will you have in your data

like image 175
Joao Raposo Avatar answered Nov 15 '22 05:11

Joao Raposo