Skip to content

Commit

Permalink
only show warning of stop word in advanced search mode
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksptang committed Oct 31, 2023
1 parent 76a1df3 commit e340a0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion step-web/src/main/webapp/js/search_selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,8 @@ step.searchSelect = {
userInput = userInput.replace(/[\n\r]/g, ' ').replace(/\t/g, ' ').replace(/\s\s/g, ' ').replace(/,,/g, ',').replace(/^\s+/g, '');
if ((userInput.length > 1) || ((step.searchSelect.userLang.toLowerCase().indexOf("zh") == 0) && (userInput.length > 0))) {
// If user enter a Lucene standard stop word, let the user know.
if (" a an and are as at be but by for if in into is it no not of on or such that the their then there these they this to was will with ".indexOf(" " + userInput.toLowerCase() + " ") > -1) {
if ((" a an and are as at be but by for if in into is it no not of on or such that the their then there these they this to was will with ".indexOf(" " + userInput.toLowerCase() + " ") > -1) &&
($("#select_advanced_search").hasClass("checked"))) {
$('#warningMessage').text('Search for extremely common words might not be found in Fuzzy, Greek and Hebrew searches.');
setTimeout(function(){
$('#warningMessage').text('');
Expand Down

0 comments on commit e340a0e

Please sign in to comment.