关于数据机房建设的网站,xp做网站服务器吗,晋城 网站建设,有模板做ppt的网站有哪些Elasticsearch 做为老牌搜索引擎#xff0c;功能基本满足#xff0c;但复杂#xff0c;重量级#xff0c;适合大数据量。 MeiliSearch 设计目标针对数据在 500GB 左右的搜索需求#xff0c;极快#xff0c;单文件#xff0c;超轻量。 所以#xff0c;对于中小型项目来说… Elasticsearch 做为老牌搜索引擎功能基本满足但复杂重量级适合大数据量。 MeiliSearch 设计目标针对数据在 500GB 左右的搜索需求极快单文件超轻量。 所以对于中小型项目来说我们可以考虑另一种搜索引擎MeiliSearch。 1、没有apiKey的Config构造使用时候的报错
import com.alibaba.fastjson.JSONObject;
import com.meilisearch.sdk.Client;
import com.meilisearch.sdk.Config;
import com.meilisearch.sdk.Index;
import lombok.extern.slf4j.Slf4j;Slf4j
public class MeiliSearchTest {public static void main(String[] args) {try {
// Client client new Client(new Config(http://localhost:7700, oHD13HXio7EtmeVZ0pw4yTzsYgD_1pJon6r9P0s20VI));Client client new Client(new Config(http://localhost:7700));Index index client.index(555ac306-f5d5-4924-b447-407e12b52398);JSONObject jsonObj new JSONObject();jsonObj.put(id, 998);jsonObj.put(name5, name5);index.addDocuments(jsonObj.toJSONString());} catch (Exception e) {log.error(errorMsg:::, e);}}} apiKey是启动的时候 --master-key 2、addDocuments的值没有id的话不会报错但是实际没有添加成功