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

v4.0问题求助 #4

Open
catlane opened this issue Oct 28, 2019 · 7 comments
Open

v4.0问题求助 #4

catlane opened this issue Oct 28, 2019 · 7 comments

Comments

@catlane
Copy link

catlane commented Oct 28, 2019

image
v4.0composer不下来,第二就是无法使用分页,会报错; 如果可以的话,帮忙解决下~~谢谢

baijunyao added a commit that referenced this issue Oct 28, 2019
@baijunyao
Copy link
Owner

多谢反馈; 分页的兼容性问题我修复了下;
image
不能安装的问题我测了下; 可以正常 composer ; 你是用了镜像吗? 没更新?

@baijunyao
Copy link
Owner

baijunyao commented Oct 28, 2019

#2

@catlane
Copy link
Author

catlane commented Oct 31, 2019

老哥,想弱弱的问一句,第一,如何更改端口,因为我们端口做了解析,是直接访问域名的,然后就是,怎么配置用户名和密码....急 @baijunyao

@catlane
Copy link
Author

catlane commented Oct 31, 2019

ELASTICSEARCH_PORT=9200
ELASTICSEARCH_HOST=http://127.0.0.1
ELASTICSEARCH_USER=elastic
ELASTICSEARCH_PASS=changeme
这样配置不对啊,提示
image

baijunyao added a commit that referenced this issue Oct 31, 2019
@catlane
Copy link
Author

catlane commented Nov 11, 2019

analyzer这个参数是不是并没有被用到啊?场景如下,数据表里有如下字段:title、keywords、answer、category_id、id,我只想让他索引title和keywords,并且使用ik的ik_smart来进行操作,但是我看了下源码,好像analyzer并没有被使用到,所以求问

@baijunyao
Copy link
Owner

baijunyao commented Nov 11, 2019

analyzer 的用法在这: https://github.com/baijunyao/laravel-scout-elasticsearch/blob/v3.0.1/src/Console/ImportCommand.php
把自定义的命令行删掉后确实没用到 analyzer 这个配置了; 我抽空了把这个配置加上;
只想索引 title 和 keywords 的话; 可以 Model 中定义 toSearchableArray() 方法; 参考这里: https://github.com/baijunyao/laravel-bjyblog/blob/171486b8a739c456d9a558e8c39adcc7311e3585/app/Models/Article.php#L41

@catlane
Copy link
Author

catlane commented Nov 12, 2019

WX20191112-092512@2x

其实对于查询我想实现的就是这个操作 ~~~

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