diff --git a/awx/ui/client/src/shared/smart-search/smart-search.service.js b/awx/ui/client/src/shared/smart-search/smart-search.service.js index 8e7b57271d..fc540c3573 100644 --- a/awx/ui/client/src/shared/smart-search/smart-search.service.js +++ b/awx/ui/client/src/shared/smart-search/smart-search.service.js @@ -14,6 +14,10 @@ export default [function() { let groups = []; let quoted; + // This split _may_ split search terms down the middle + // ex) searchString=ansible_facts.some_other_thing:"foo foobar" ansible_facts.some_thing:"foobar" + // would result in 3 different substring's but only two search terms + // This logic handles that scenario with the `quoted` variable searchString.split(' ').forEach(substring => { if (/:"/g.test(substring)) { if (/"$/.test(substring)) {