小编Dev*_*tna的帖子

将nox模拟器连接到vs code

我想将Nox android模拟器连接到VS Code以通过flutter开发Android应用程序

在运行 VS Code 之前,adb devices 命令显示包含 nox 的已连接设备列表,但是当我运行 VS Code 然后键入 adb devices 时,结果是:守护进程未运行。现在在端口 5037 上启动它。守护进程已成功启动。

如果我重新运行命令: adb 服务器 (41) 与此客户端 (36) 不匹配;杀戮。守护进程成功启动。

有什么想法可以将 nox 连接到 vscode 吗?

android-emulator dart visual-studio-code flutter vscode-tasks

8
推荐指数
2
解决办法
1万
查看次数

使用 Java API 进行 Elasticsearch 排序

我正在尝试根据 totalEmployee 字段对文档进行排序,其中索引是index_db,类型是部门,字段是totalEmployee

QueryBuilder qb = QueryBuilders.matchAllQuery();
            SearchResponse response = client.prepareSearch("index_db").setTypes("departments")
                    .addSort(SortBuilders.fieldSort("totalEmployee").order(SortOrder.ASC)).setQuery(qb)
                    .setSize(100).execute().actionGet();
            for(SearchHit hits :response.getHits()) {
                System.out.print("id = "+hits.getId());
                System.out.println(hits.getSourceAsString());
            }
Run Code Online (Sandbox Code Playgroud)

但我收到错误:

Exception in thread "main" Failed to execute phase [query], all shards failed; shardFailures {[q9B7Qs-DSXWC14pjc5zlNg][index_db][0]: RemoteTransportException[[elasticsearch_node][10.64.216.92:9375][indices:data/read/search[phase/query]]]; nested:

IllegalArgumentException[Fielddata is disabled on text fields by default. Set fielddata=true on [totalEmployee] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.]; }{[q9B7Qs-DSXWC14pjc5zlNg][index_db][1]: RemoteTransportException[[elasticsearch_node][10.64.216.92:9375][indices:data/read/search[phase/query]]]; nested: IllegalArgumentException[Fielddata …

java elasticsearch

3
推荐指数
1
解决办法
8393
查看次数