Skip to content
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

clp-s: Don't add implicit wildcards ('*') at the beginning and the end of a query (fixes #390). #406

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions components/core/src/clp_s/search/Output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -888,23 +888,7 @@ void Output::populate_string_queries(std::shared_ptr<Expression> const& expr) {

// search on log type dictionary
Query& q = m_string_query_map[query_string];
if (query_string.find("*") != std::string::npos
|| filter->get_column()->matches_type(LiteralType::VarStringT))
{
// if it matches VarStringT then it contains no space, so we
// don't't add more wildcards. Likewise if it already contains some wildcards
// we do not add more
Grep::process_raw_query(
m_log_dict,
m_var_dict,
query_string,
m_ignore_case,
q,
false
);
} else {
Grep::process_raw_query(m_log_dict, m_var_dict, query_string, m_ignore_case, q);
}
Grep::process_raw_query(m_log_dict, m_var_dict, query_string, m_ignore_case, q, false);
}
SubQuery sub_query;
if (filter->get_column()->matches_type(LiteralType::VarStringT)) {
Expand Down
Loading