Skip to content
Snippets Groups Projects
Commit a9fbc27c authored by buczekp's avatar buczekp
Browse files

[LMS-1829] always use non wildcard mode if search term contains '*'

SVN: 18217
parent e555ad41
No related branches found
No related tags found
No related merge requests found
......@@ -78,8 +78,12 @@ public class LuceneQueryBuilder
(useWildcardSearchMode == true) ? CHARS_ESCAPED_IN_WILCARD_MODE
: CHARS_ESCAPED_IN_BASIC_MODE;
String result = escapeQuery(userQuery, escapedChars);
// add '*' wildcard at the beginning and at the end of the query in basic search mode
if (useWildcardSearchMode == false && isQuoted(result) == false)
// add '*' wildcard at the beginning and at the end of the query if all conditions are met:
// 1. in basic search mode
// 2. query is not in quotes
// 3. query doesn't contain '*'
if (useWildcardSearchMode == false && isQuoted(result) == false
&& result.contains("*") == false)
{
result = addWildcards(result);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment