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
        );
    }