简体   繁体   中英

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" ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM