Skip to content
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

[求助] 请问如何实现Request Body Query? #9

Open
gary101 opened this issue Jun 14, 2020 · 2 comments
Open

[求助] 请问如何实现Request Body Query? #9

gary101 opened this issue Jun 14, 2020 · 2 comments

Comments

@gary101
Copy link

gary101 commented Jun 14, 2020

如题,目前看到所有的教程和示例都是使用的URI search(如Article::search('功能齐全的搜索引擎')->get()->toArray(),效果其实就是URI查询)。

请问search()方法如何实现Request Body Query查询?如何指定请求方式(GET/POST/PUT等)?即类似:

POST /movies/_search { "query":{ "match":{ "title":"Last Christams" } } }

感激不尽!

@baijunyao
Copy link
Owner

试试这个扩展包?看能满足你的需求不; https://github.com/elasticquent/Elasticquent#raw-queries

@gary101
Copy link
Author

gary101 commented Jun 15, 2020

@baijunyao 好的感谢,我试试看。其实试过很多,感觉您的这一款最方便快捷。只是不支持raw query和highlight功能有点可惜。

再次感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants