$搜索在OData Web API 2中不起作用 [英] $Search not working in odata web api 2
问题描述
我无法确定如何获取$ search参数以在odata中进行全文搜索.
以下网址表示应将其包含在6.1中 http://localhost:53621 /odata/PartnerMaster?%24format = json&%24top = 100&%24orderby = PartnerName&%24search = Test
我收到错误消息. message =不支持查询参数"$ search"
:)再见.在此处复制答案,以使更多的人意识到这一点.
ODL支持解析$ search查询选项,但是,到目前为止,Web API OData还不支持该选项.
在ODL中,您可以引用以下测试用例:
I have created a sample application using the following template http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/create-an-odata-v4-endpoint
When I execute the odata query http://localhost:53621/odata/PartnerMaster?%24format=json&%24top=100&%24orderby=PartnerName&%24search=Test
I receive the error message. message=The query parameter '$search' is not supported
:) See you again. Copy the answer here to let more people aware of it.
ODL supports to parse the $search query option, however, Web API OData doesn’t support it so far.
While, in ODL, you can refer the following test cases:
这篇关于$搜索在OData Web API 2中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!