设置索引库结构,给用户添加可自动补全的suggestion,并将一些字段变成集合放到suggestion里面去

设置索引库结构,给用户添加可自动补全的suggestion,并将一些字段变成集合放到suggestion里面去

image-20230313225514389

若business有多个sss值,可进行切割

进行切割

1
2
3
4
5
6
7
8
9
//将brand 和 business 变成集合放到suggestion里
if(this.business.contains("/")){
//business有多个值,需要切割
String[] arr = this.business.split("/");
//添加元素
this.suggestion = new ArrayList<String>();
Collections.addAll(this.suggestion,arr);
}else
this.suggestion = Arrays.asList(this.brand,this.business);

切割成功