client/splunk.ui.charting.js
function(q, isUserEntered) {
            var workingQ = '' + q;
            workingQ = workingQ.replace(this.reLTrim, '').replace(this.reRNormalize, ' ');
            if (workingQ.substring(0, 1) == '|') {
                return q;
            }

            // this is specific to the case where searchstring = 'search ',
            // which we conservatively assume does not constitute a search command
            if (!isUserEntered
                && (workingQ.substring(0, 7) == 'search ' && workingQ.length > 7))
            {
                return q;
            }
            return 'search ' + workingQ;
        }
function(q, isUserEntered) {
            var workingQ = '' + q;
            workingQ = workingQ.replace(this.reLTrim, '').replace(this.reRNormalize, ' ');
            if (workingQ.substring(0, 1) == '|') {
                return q;
            }

            // this is specific to the case where searchstring = 'search ',
            // which we conservatively assume does not constitute a search command
            if (!isUserEntered
                && (workingQ.substring(0, 7) == 'search ' && workingQ.length > 7))
            {
                return q;
            }
            return 'search ' + workingQ;
        }
function ( q , isUserEntered ) { var workingQ = '' + q ; workingQ = workingQ . replace ( this . reLTrim , '' ) . replace ( this . reRNormalize , ' ' ) ; if ( workingQ . substring ( 0 , 1 ) == '|' ) { return q ; } // this is specific to the case where searchstring = 'search ', // which we conservatively assume does not constitute a search command if ( ! isUserEntered && ( workingQ . substring ( 0 , 7 ) == 'search ' && workingQ . length > 7 ) ) { return q ; } return 'search ' + workingQ ; }
Returns a fully qualified search string by prepending the 'search'
command of unqualified searches.  This method deems strings as unqualified
if it does not start with a | or 'search '

@param {boolean} isUserEntered Indicates if 'q' is expected to be unqualified
Returns a fully qualified search string by prepending the search command of unqualified searches . This method deems strings as unqualified if it does not start with a | or search