Apache Lucene open-source search software
Fixed case where wildcard character at start of string.
Kelvin Taneb9bc807dae7
diff --git a/sandbox/contributions/javascript/queryValidator/luceneQueryValidator.js b/sandbox/contributions/javascript/queryValidator/luceneQueryValidator.jsindex 011dcf71935..843be1e4ea7 100644--- a/sandbox/contributions/javascript/queryValidator/luceneQueryValidator.js+++ b/sandbox/contributions/javascript/queryValidator/luceneQueryValidator.js@@ -40,7 +40,7 @@ function doCheckLuceneQuery(queryField)}// check wildcards are used properly- matches = query.match(/^[\*]*$|([\s]\*)/);+ matches = query.match(/^[\*]*$|[\s]\*|^\*[^\s]/);if(matches != null && matches.length > 0){if(alertUser) alert("Invalid search query! The wildcard (*) character must be preceded by at least one alphabet or number. Please try again.")