2016-11-07 82 views
2

我提出用玩笑和QueryBuilders的請求,但是當我做我的測試unitarists執行的查詢是:與EXT屬性elasticsearch查詢

"Query": { 
    "Match_all": { 
    "Boost": 1.0 
    } 
} 

但是當我去了申請,並使用玩笑和exeucuto執行一個分機屬性附接到它和ocorreo以下錯誤:

"Query": { 
    "Match_all": { 
    "Boost": 1.0 
    } 
} 
"Ext": {} 

}

回答

1

從引用:https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/search/SearchExtBuilder.java

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