|
|
|
|
@ -35,9 +35,6 @@ class BookSearch
|
|
|
|
|
// most options like search fields, sorting, etc are already set
|
|
|
|
|
// as default in the Solr config and thus should be set only on a
|
|
|
|
|
// per request basis when needed
|
|
|
|
|
|
|
|
|
|
$this->query->addField('*');
|
|
|
|
|
$this->query->addParam('q.op', 'AND');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function addOrQuery(array $texts, $field)
|
|
|
|
|
@ -55,11 +52,13 @@ class BookSearch
|
|
|
|
|
$queryText = \SolrUtils::escapeQueryChars($queryText);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$queryText = "\"$queryText\"";
|
|
|
|
|
|
|
|
|
|
if (strlen($queryField) > 0) {
|
|
|
|
|
$queryText = "$queryField:\"$queryText\"";
|
|
|
|
|
$queryText = "$queryField:$queryText";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->queryParts[] = $queryText;
|
|
|
|
|
$this->queryParts[] = "$queryText";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function addSortField($field, $order = \SolrQuery::ORDER_DESC)
|
|
|
|
|
|