Valid Title
Description
For full-text search capabilities, OJS supports two search drivers (engines): database and opensearch.
For the database search driver, a verbose query log can be enabled by setting [database] debug = On.
Unfortunately, at the moment no such option is available when using the opensearch search driver.
Having such an option would be immensely helpful for general troubleshooting (is my search indexing working? how many queries are sent to OpenSearch?) and in particular performance optimization (how long do OpenSearch queries take?).
The OpenSearch-PHP module supports specifying a middleware that can log queries as they are executed:
$logger = new \Monolog\Logger('opensearch');
$log_middleware = new \GuzzleLogMiddleware\LogMiddleware($logger);
// Simple Setup
$this->client = (new \OpenSearch\GuzzleClientFactory())->create([
'base_uri' => 'https://localhost:9200',
'auth' => ['admin', getenv('OPENSEARCH_PASSWORD')],
'verify' => false, // Disables SSL verification for local development.
'middleware' => [
'gmponos/guzzle_logger' => $log_middleware,
],
]);
https://github.com/opensearch-project/opensearch-php/blob/main/USER_GUIDE.md
Steps to Reproduce
- Enable
opensearch search driver
Expected Result
A debug or verbose option is available to logs all outgoing queries (read/write), the result (or a summary therefore) and timing information.
Actual Result
No option is available for viewing OpenSearch queries performed by OJS.
Environment Details
No response
Application Version
OJS master (79a51638a0bbb899d186a8a9ff6f207b9ec24a3a)
Logs
No response
Additional Information
No response
Valid Title
Description
For full-text search capabilities, OJS supports two search drivers (engines):
databaseandopensearch.For the
databasesearch driver, a verbose query log can be enabled by setting[database] debug = On.Unfortunately, at the moment no such option is available when using the
opensearchsearch driver.Having such an option would be immensely helpful for general troubleshooting (is my search indexing working? how many queries are sent to OpenSearch?) and in particular performance optimization (how long do OpenSearch queries take?).
The OpenSearch-PHP module supports specifying a middleware that can log queries as they are executed:
https://github.com/opensearch-project/opensearch-php/blob/main/USER_GUIDE.md
Steps to Reproduce
opensearchsearch driverExpected Result
A
debugorverboseoption is available to logs all outgoing queries (read/write), the result (or a summary therefore) and timing information.Actual Result
No option is available for viewing OpenSearch queries performed by OJS.
Environment Details
No response
Application Version
OJS master (79a51638a0bbb899d186a8a9ff6f207b9ec24a3a)
Logs
No response
Additional Information
No response