Closed ltog closed 8 years ago
Some further investigation revealed that the parsing process indeed starts with RecordCollectionFactory.php#L77. With multisearch it will be necessary to a) standardize the searchqueries (first the author, then her work) or b) to keep a reference to the used search query somewhere as the received array now has the form [response][responses][INTEGER][hits][hits].
As I don't know yet if a reference to the used searchquery would be thread-safe, i vote for standardizing the searchquery. One way or another, This RecordCollectionFactory is the place where the php-object gets parsed.
Commit https://github.com/linked-swissbib/vufind/commit/42cbeb9c786b1c54a9fc69c893d469366b195e65 introduces the first step in using multisearch. There were only two steps done here: 1. override the
$params['body']
and 2. callmsearch
instead ofsearch
. A very important detail is that this search string HAS to end with a newline.As the code introduced in this commit represents a working communication between vufind and elasticsearch, it is possible to investigate further on two ends: building the request and parsing the response. Following my former observations that might help: