src/Graviton/DocumentBundle/Service/SolrQuery.php
private function doAndNotPrefixSingleTerm($term, $modifier)
    {
        // already modifier there?
        $last = substr($term, -1);
        if ($last == '~' || $last == '*') {
            // clean from term, override modifier from client
            $modifier = $last;
            $term = substr($term, 0, -1);
        }

        return sprintf(
            '(%s OR %s%s)',
            $term,
            $term,
            $modifier
        );
    }
private function doAndNotPrefixSingleTerm($term, $modifier)
    {
        // already modifier there?
        $last = substr($term, -1);
        if ($last == '~' || $last == '*') {
            // clean from term, override modifier from client
            $modifier = $last;
            $term = substr($term, 0, -1);
        }

        return sprintf(
            '(%s OR %s%s)',
            $term,
            $term,
            $modifier
        );
    }
private function doAndNotPrefixSingleTerm ( $ term , $ modifier ) { // already modifier there? $ last = substr ( $ term , - 1 ) ; if ( $ last == '~' || $ last == '*' ) { // clean from term, override modifier from client $ modifier = $ last ; $ term = substr ( $ term , 0 , - 1 ) ; } return sprintf ( '(%s OR %s%s)' , $ term , $ term , $ modifier ) ; }
ORify a single term

@param string $term     search term
@param string $modifier modified

@return string ORified query
ORify a single term