Odata通配符在开始时而不是查询的末端
我知道您可以为通配符做这样的ODATA查询,
$filter=search.ismatch('lux*', 'Description')
我想做的是
$filter=search.ismatch('*lux', 'Description')
我尝试了上述查询,它没有返回任何信息,而且我知道'*lux''
理想情况下有匹配 的匹配在这样的查询中,有2个不同的字段,
search=&$filter=Hotel eq 'Southern' and search.ismatch('*lux', 'Description')
即语法不会返回任何
理想结果设置的内容: 酒店:描述: 南部Ultra Lux 南部巨型勒克斯
也不知道该如何标记,因为我不使用它,所以很抱歉它被误了
I know that you can do an odata query like this for wildcards
$filter=search.ismatch('lux*', 'Description')
What I would like to do is this
$filter=search.ismatch('*lux', 'Description')
I have tried the above query and it did not return any information and I know there are matches for '*lux'
Ideally I would like to have 2 different fields in the query like this
search=&$filter=Hotel eq 'Southern' and search.ismatch('*lux', 'Description')
That syntax does not return anything either
Ideal result set:
Hotel: Description:
Southern Ultra lux
Southern Mega lux
Also I did not know how to tag this as I don't work with it a lot so I am sorry if it is mis tagged
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我找到了这个答案:您不能使用 *或?符号是搜索的第一个字符。在通配符搜索查询上未进行文本分析。在查询时,将通配符查询术语与搜索指数中的分析术语进行比较并扩展。
看起来只有通配符在搜索查询的开头时,才不可能。如果通配符处于搜索查询的末端或中间,则它将完美地工作。
I found this answer: You cannot use a * or ? symbol as the first character of a search. No text analysis is performed on wildcard search queries. At query time, wildcard query terms are compared against analyzed terms in the search index and expanded.
Looks like it isn't possible only if the wildcard is at the beginning of the search query. If the wildcard is at the end or middle of the search query then it will work perfectly.
如果您的QueryType设置为“ Full”(调用Lucene Parser),并且如果您使用常规的全文搜索(“ search =”),则可以在Azure认知搜索中进行前缀,后缀和Infix查询。 。前缀,后缀和infix是通配符搜索表格的变化。如果您想看看文档中有一些示例。
You can do prefix, suffix and infix queries in Azure Cognitive Search if your queryType is set to "full" (invokes the full Lucene parser) and if you're using regular full text search ("search=") instead of a $filter. Prefix, suffix, and infix are variations of wildcard search forms. There are some examples in the docs if you want to take a look.