protected function fullQueryString()
    {
        $queryParts = [];

        // Main search can be default search or full text search.
        if ($this->queryString) {
            if (!$this->querySwitchFulltext) {
                $queryParts[] = $this->queryString;
            } else {
                $queryParts[] = $this->createSearchString('fulltext', $this->queryString);
            }
        }
        // Title search can be proper title or journal title depending on the switch.
        if ($this->queryStringTitle) {
            if (!$this->querySwitchJournalOnly) {
                $queryParts[] = $this->createSearchString('title', $this->queryStringTitle);
            } else {
                $queryParts[] = $this->createSearchString('journal', $this->queryStringTitle);
            }
        }
        // Person search is a phrase search.
        if ($this->queryStringPerson) {
            $myQueryStringPerson = preg_replace('/^[\s"]*/', '', $this->queryStringPerson);
            $myQueryStringPerson = preg_replace('/[\s"]*$/', '', $myQueryStringPerson);
            $queryParts[] = $this->createSearchString('person', '"' . $myQueryStringPerson . '"');
        }
        if ($this->queryStringKeyword) {
            $queryParts[] = $this->createSearchString('subject', $this->queryStringKeyword);
        }
        if ($this->queryStringDate) {
            $queryParts[] = $this->createSearchString('date', $this->queryStringDate);
        }

        $query = implode(' and ', $queryParts);
        $query = str_replace('*', '?', $query);
        return $query;
    }