clp
clp copied to clipboard
clp-s: Incorrect search results with a "?" at the end of a query
Bug
For wildcard queries using clp-s, if the ? wildcard is positioned in the middle, it triggers bug #403. However, when it appears at the end of the query, it may return unmatched results. This is because we replace ? with *, leading to find unmatched log-type entries, and fail to perform a wildcard match with the original query (including ?) after decompressing a message.
CLP version
3e95aafe132cd713169acf79cd15f7c13a63cabd
Environment
MacOS 13.2.1
Reproduction steps
Compress the log below and run the query a: *Hello?. Because the query contains a *, it won't automatically add * to the beginning and the end of the query. However, instead of returning empty results, it returns both log messages.
{"a": "Hello world?", "b": 1, "c":"*"}
{"a": "Hello *", "b": "?world"}