I am following the Solr quick start tutorial and got the web app up and running. I know that Solr has a regular expression search functionality and I am having a hard time get it working.
So here, I have a field called MFR and I want to use regular expression to match values like AVAGO. However, it is giving me errors like cannot parse it correctly, then I tried to escape certain characters and all the following didn't work:
Your question is how to use a RegExpQuery on query screen.
You already did use RegExpQuery in lucene.
As default solr using the standard query parser. The standard query parser does support
RegexpQuery but a RegExp have to start and end with the slash character
Be aware that a regular expression must match against the token in the inverted index and not against the original word.
E.g. for FieldType "text_general" a word
AVAGO will become the token
avago, so a regExpr with uppercase letters would not match.
You can test with the solr analysis screen the way from a word (in real text) to the corresponding token in the index.
See also: How to use regex for querying in Solr 4