-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement info logging #11
Comments
First implementation (commit f0dda61 ): Logging must be enabled per rewriter. This must be done in the rewriter configuration (https://docs.querqy.org/querqy/rewriters.html). For this, the rewriter configuration is extended by an {
"class": "querqy.elasticsearch.rewriter.SimpleCommonRulesRewriterFactory",
"info_logging": {
"sinks": ["log4j"]
},
"config": {
"rules" : "notebook =>\nSYNONYM: laptop"
}
} We can an additional specification for logging per search request: {
"query": {
"querqy": {
"matching_query": {
"query": "notebook",
},
"query_fields": [
"title^3.0", "brand^2.1", "shortSummary"
],
"info_logging": {
"id":"Some request or query identifier",
"type": "DETAIL"
},
"rewriters": [
"common_rules"
]
}
} The
Example log messages: Rewriters 'common_rules1' and 'common_rules2' logging their full details. Request
Rewriters 'common_rules' logging its rewriter ID. Request
The log output prints out Unfortunately, we will have to change the mapping for the .querqy index in ES to: {
"properties": {
"class": {"type": "keyword"},
"type": {"type": "keyword"},
"info_logging": {
"properties": {
"sinks": {"type" : "keyword" }
}
},
"config": {
"type" : "keyword",
"index": false
}
}
} We need to add the |
Implemented via #13 |
Implement the ES equivalent of info logging (https://docs.querqy.org/querqy/solr-plugin-configuration.html#info-logging).
The goal is that we can track information that was emitted by rewriters. The existing implementation at Querqy Core level provides an InfoLogging framework and the Common Rules Rewriter already produces the information which rules where applied. As part of the general info logging framework, this information can be sent to a
Sink
.In Solr, the only Sink implementation returns the log messages as part of the search request response. This option is not available in ES as we cannot manipulate the response. The idea is to create a Sink implementation that simply logs the messages using Java logging (as usual in ES). We should provide some request parameter that will be passed through and appended to the log message so that the message can be related to a query or to a request id.
The text was updated successfully, but these errors were encountered: