我使用 Jest 和 QueryBuilders 发出了请求,但是当我进行测试时,执行的查询是:
"Query": {
"Match_all": {
"Boost": 1.0
}
}
但是当我启动应用程序并使用 Jest 和 exeucuto 执行时,一个 ext 属性附加到它并且 ocorreo 出现以下错误:
"Query": {
"Match_all": {
"Boost": 1.0
}
}
"Ext": {}
最佳答案
Intermediate serializable representation of a search ext section. To be subclassed by plugins that support a custom section as part of a search request, which will be provided within the ext element. Any state needs to be serialized as part of the {@link Writeable#writeTo(StreamOutput)} method and read from the incoming stream, usually done adding a constructor that takes {@link StreamInput} as an argument.
Registration happens through {@link SearchPlugin#getSearchExts()}, which also needs a {@link NoContextParser} that's able to parse the incoming request from the REST layer into the proper {@link SearchExtBuilder} subclass.
{@link #getWriteableName()} must return the same name as the one used for the registration of the {@link SearchExtSpec}.
@see SearchExtSpec
关于java - 带有 ext 属性的 elasticsearch 查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40471502/