当前位置: 首页>>代码示例>>Java>>正文


Java SearchRequest.readFrom方法代码示例

本文整理汇总了Java中org.elasticsearch.action.search.SearchRequest.readFrom方法的典型用法代码示例。如果您正苦于以下问题:Java SearchRequest.readFrom方法的具体用法?Java SearchRequest.readFrom怎么用?Java SearchRequest.readFrom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.action.search.SearchRequest的用法示例。


在下文中一共展示了SearchRequest.readFrom方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readFrom

import org.elasticsearch.action.search.SearchRequest; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    searchRequest = new SearchRequest();
    searchRequest.readFrom(in);
    abortOnVersionConflict = in.readBoolean();
    size = in.readVInt();
    refresh = in.readBoolean();
    timeout = new TimeValue(in);
    activeShardCount = ActiveShardCount.readFrom(in);
    retryBackoffInitialTime = new TimeValue(in);
    maxRetries = in.readVInt();
    requestsPerSecond = in.readFloat();
    if (in.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
        slices = in.readVInt();
    } else {
        slices = 1;
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:20,代码来源:AbstractBulkByScrollRequest.java

示例2: testSerialization

import org.elasticsearch.action.search.SearchRequest; //导入方法依赖的package包/类
public void testSerialization() throws Exception {
    SearchRequest searchRequest = createSearchRequest();
    try (BytesStreamOutput output = new BytesStreamOutput()) {
        searchRequest.writeTo(output);
        try (StreamInput in = new NamedWriteableAwareStreamInput(output.bytes().streamInput(), namedWriteableRegistry)) {
            SearchRequest deserializedRequest = new SearchRequest();
            deserializedRequest.readFrom(in);
            assertEquals(deserializedRequest, searchRequest);
            assertEquals(deserializedRequest.hashCode(), searchRequest.hashCode());
            assertNotSame(deserializedRequest, searchRequest);
        }
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:SearchRequestTests.java

示例3: readFrom

import org.elasticsearch.action.search.SearchRequest; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);
    name = in.readString();
    if (in.readBoolean()) {
        searchRequest = new SearchRequest();
        searchRequest.readFrom(in);
    }
    readTimeout(in);
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:11,代码来源:PutWarmerRequest.java


注:本文中的org.elasticsearch.action.search.SearchRequest.readFrom方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。