user1213664
user1213664

Reputation:

SOLR search issue in wild character

I have a search query in SOLR with wild char . My need is I need to set the character length. Is it possible in SOLR ?.

For Eg

status:(d*mo) - I need to get only a word with 4 character, ie one character should be replaced in second position

Please help

Thanks


Great ! One more doubt. Do we need to put back slash before "?" ? ie does d\?mo is needed ? Also in SOLR whether single slash is supporting ? For Eg : Can I check the word "jack's" ?

Upvotes: 1

Views: 2205

Answers (1)

Jayendra
Jayendra

Reputation: 52779

There are two forms of wildcard character:

  • asterisk ("*") which will match zero or more arbitrary characters and
  • question mark ("?") which will match exactly one arbitrary character.

If you want to check for single arbitary character you should use ?

So d?mo would match words with 4 characters with second character being the variable part.

For Detailed information refer to Wildcard Queries

Upvotes: 3

Related Questions