-
Notifications
You must be signed in to change notification settings - Fork 2
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
Allow alternate / native search syntax #293
Allow alternate / native search syntax #293
Comments
Comment by @mikepizzo: perhaps something like $search:lucene= could decide if the syntax is a hint or a requirement (since search is fuzzy anyway) |
Comment by @HeikoTheissen: An example for context-sensitive search:
In the first row 'Georgia' matches the value 'GA', but in the last row it does not. Such a behavior could be implemented by mapping OData search expressions to different search models, depending on the property:
|
SAP wants to use a different search syntax where
This SAP-specific search syntax is already widely used both with OData V2 ( |
When doing text searches, many of the common algorithms we use have a number of different ways to define a match (Exact match, begins with, synonym, base word or inflection, etc). The $search query parameter defines a search syntax but its definition says it is up to the implementation as to what constitutes a match. This is fine, but in the case where the search engine provides different matching types it would be nice if user had a way to specify how the type of match to be used in the search expression.
This was originally filed as ODATA-1100 / #861 as a request to modify the existing $search syntax to support specifying match type. In discussing the proposal for ODATA-1100 with some users, it was suggested that we do not define our own syntax for specifying match type. There are several common search engines that define a syntax that allows the type of match to be specified. The most common of these is currently is Apache Lucene -
https://lucene.apache.org/core/. Instead of expanding the $search syntax, should we provide a way for the user to specify an alternate or native syntax so that they can utilize the underlying capabilities of the search engine? If we do allow alternate syntax, there is likely a need for some metadata describing what if any alternate syntax a service understands.
Proposal
Make $search a pass-through query option, impose no syntax, and impose no other restrictions than what is necessary to parse the URL.
Make V4 $search syntax just an optional recommendation.
Add a Capabilities term of type URL that allows pointing to the search syntax supported by the service, which may be the V4 $search syntax.
Imported from ODATA-1113
The text was updated successfully, but these errors were encountered: