如何在天蓝色搜索查询语法中为类似查询设置查询? [英] how to set a query for like query in azure search query syntax?

查看:53
本文介绍了如何在天蓝色搜索查询语法中为类似查询设置查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从我的项目中进行天蓝色搜索,并且正在尝试以下操作

I am trying azure search from my project and i am trying the following

 indexClient.Documents.Search<AuctionResult>("john", new SearchParameters { IncludeTotalResultCount = true, Filter = "SoldDate ge 2017-04-06 and SoldDate le 2017-04-06 and substringof(Title, '2007')" });

我需要做的是根据标题"字段过滤结果,如果标题"包含文本"2007",则应将其包括在内.

what i need is i need to filter the result based on the field Title, if Title contains the text '2007', it should be included.

我怎么了,我应该做些什么改变?

what went wrong for me, what change should i make?

推荐答案

最后我找到了解决方法

所以我们应该在查询中使用以下内容

so we should use the following in the query

search.ismatch('searchQuery',Search_feild)"

如此

"SoldDate ge 2017-04-06 and SoldDate le 2017-04-06 and search.ismatch('2007','Title')"

这篇关于如何在天蓝色搜索查询语法中为类似查询设置查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆