I have a requirement to FTS a group of words - eg: “elon musk” as the searched word.
This phrase should match document field let us say - full name with the value “South African-born business magnate, investor, engineer, and inventor elon musk is a visionary that the world needs today.”
I used the expression \Welon musk\w
My java code snippet looks as follows:
String regexpFullName = "\W " + fullName + “\w”;
RegexpQuery regexFullNameQuery = new RegexpQuery(regexpFullName).field(CASE_INFO_FULL_NAME);
I created an index by full name and used the query above to fetch results.
The query is fetching 0 results.
Any help is appreciated.