2016-11-07 3 views
2

Ich habe eine Anfrage mit Jest und QueryBuilders, aber wenn ich meine Tests tun Unitaristen der ausgeführten Abfrage ist:Elasticsearch Abfrage mit ext Attribut

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

Aber wenn ich die Anwendung nach oben und führen Sie die Jest mit und exeucuto ein ext Attribut wird daran befestigt und ocorreo den folgenden Fehler:

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

}

Antwort

1

von Zitiert:

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