linked-swissbib / vufind

A library resource discovery portal designed and developed for libraries by libraries
GNU General Public License v2.0
1 stars 2 forks source link

Konstruktion der Multisearch über Konfigurations-Datei #11

Closed ltog closed 8 years ago

PhilippKuntschik commented 8 years ago

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. call msearch instead of search. 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:

PhilippKuntschik commented 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.