diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-12 08:04:56 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-08-12 08:04:56 -0400 |
| commit | 4927e0d6318afc63f3476839999761decc5842ac (patch) | |
| tree | 45dbcc184260fc030d4e1a618eb3b2d7bcd34bf4 /src/client/views/search | |
| parent | 4d6da44b4eb484d79fc263e5d36c02ea50265767 (diff) | |
switching syntax from && to AND for solr filters and added quotes around solr term values
Diffstat (limited to 'src/client/views/search')
| -rw-r--r-- | src/client/views/search/SearchBox.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx index 39dd8d4bf..36b490839 100644 --- a/src/client/views/search/SearchBox.tsx +++ b/src/client/views/search/SearchBox.tsx @@ -279,10 +279,10 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc const newWords: string[] = []; const oldWords = values[0].split(" "); oldWords.forEach((word, i) => { - i === 0 ? newWords.push(key + mod + word) : newWords.push("&& " + key + mod + word) + i === 0 ? newWords.push(key + mod + "\"" + word + "\"") : newWords.push("AND " + key + mod + "\"" + word + "\"") }); let v = "(" + newWords.join(" ") + ")"; - query = query + " && " + v; + query = query + " AND " + v; } else { for (let i = 0; i < values.length; i++) { @@ -290,11 +290,11 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc const newWords: string[] = []; const oldWords = values[i].split(" "); oldWords.forEach((word, i) => { - i === 0 ? newWords.push(key + mod + word) : newWords.push("&& " + key + mod + word) + i === 0 ? newWords.push(key + mod + "\"" + word + "\"") : newWords.push("AND " + key + mod + "\"" + word + "\"") }); let v = "(" + newWords.join(" ") + ")"; if (i === 0) { - query = query + " && (" + v; + query = query + " AND (" + v; if (values.length === 1) { query = query + ")"; } |
