-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add support for partial matching in the wildcard query #27
Conversation
src/clp_ffi_py/ir/native/Query.hpp
Outdated
} | ||
} | ||
|
||
[[nodiscard]] auto get_uncleaned_wildcard_query() const -> std::string const& { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets rename get_uncleaned_wildcard_query
. Maybe something like get_original_query_string
or get_user_query_string
. I don't think we need to explicitly call it a wildcard query considering this is a method of the WildcardQuery
class (so pretty redundant). I'm a bit indifferent about adding _string
as a suffix, but it would probably be necessary if there is ever a Query
class in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I will keep the suffix _string
to differentiate it from the actual query and the input.
As we discussed offline, without partial matching, the current |
@kirkrodrigues I think we have a clear use case where users want the wildcard to be automatically surrounded by |
Things are a little awkward because users are already using this library in production and the recommended practice is not to change APIs without a major version bump; to support new functionality before the major version bump, the recommendation is to mark the current API for deprecation and then add new APIs with the new functionality. In light of that, my proposal would be:
|
The equivalence has been implemented in PR #62 |
Description
In most cases, users want to search for any result containing the given wildcard search string. This is implemented as "partial matching", which is the default search query in
clg
. This PR implements partial matching as the default option when building the wildcard query.In terms of the low level implementation details, a partial match wildcard query
"${WILDCARD_STRING}"
is equivalent to the full match wildcard query*${WILDCARD_STRING}*
.Validation performed