|
|
|
|
@ -35,6 +35,14 @@ 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
|
|
|
|
|
|
|
|
|
|
/* if sometime we need to set the fields explicitly, those should be the ones we want :
|
|
|
|
|
$this->query->addField('id, code, isbn');
|
|
|
|
|
$this->query->addField('editor, editorTown, year, producer, producerCode, availabilityDate, collection');
|
|
|
|
|
$this->query->addField('title, author, reader, summary');
|
|
|
|
|
$this->query->addField('jeunesse, genre, genreCode, motsMatieres, cdu');
|
|
|
|
|
$this->query->addField('media, mediaType, cover, samples, zip, zip_size');
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function addOrQuery(array $texts, $field)
|
|
|
|
|
@ -104,7 +112,7 @@ class BookSearch
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
$results = $this->client->query($this->query)->getArrayResponse();
|
|
|
|
|
} catch(\SolrClientException $e) {
|
|
|
|
|
} catch(\SolrException $e) {
|
|
|
|
|
throw new WebException ("SolrError", $e->getMessage(), -700);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|