org.elasticsearch.index.query.ExistsQueryBuilder Java Examples

The following examples show how to use org.elasticsearch.index.query.ExistsQueryBuilder. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExistApiMain.java    From elasticsearch-pool with Apache License 2.0 6 votes vote down vote up
public static void main(String[] args) throws IOException {
    RestHighLevelClient client = HighLevelClient.getInstance();
    try{
        ExistsQueryBuilder matchQueryBuilder = QueryBuilders.existsQuery("retcode");//查询某个字段存在的记录

        SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
        searchSourceBuilder.query(matchQueryBuilder);
        searchSourceBuilder.from(0);
        searchSourceBuilder.size(1);

        SearchRequest searchRequest = new SearchRequest("serverlog_20180701");//限定index
        searchRequest.types("log");//限定type
        searchRequest.source(searchSourceBuilder);

        SearchResponse searchResponse = client.search(searchRequest);
        System.out.println(searchResponse);


    }finally{
        HighLevelClient.close();
    }
}
 
Example #2
Source File: BsFileConfigCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setIntervalTime_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("intervalTime");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #3
Source File: BsBoostDocumentRuleCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setUpdatedTime_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("updatedTime");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #4
Source File: BsWebConfigCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setDepth_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("depth");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #5
Source File: BsAccessTokenCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setCreatedBy_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("createdBy");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #6
Source File: BsThumbnailQueueCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setPath_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("path");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #7
Source File: EsAbstractConditionQuery.java    From fess with Apache License 2.0 4 votes vote down vote up
protected ExistsQueryBuilder regExistsQ(String name) {
    ExistsQueryBuilder existsQuery = QueryBuilders.existsQuery(name);
    regQ(existsQuery);
    return existsQuery;
}
 
Example #8
Source File: BsScheduledJobCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setCreatedTime_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("createdTime");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #9
Source File: BsElevateWordToLabelCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setElevateWordId_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("elevateWordId");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #10
Source File: BsBoostDocumentRuleCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setUrlExpr_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("urlExpr");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #11
Source File: BsCrawlingInfoCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setSessionId_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("sessionId");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #12
Source File: BsCrawlingInfoParamCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setCrawlingInfoId_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("crawlingInfoId");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #13
Source File: BsKeyMatchCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setBoost_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("boost");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #14
Source File: BsFailureUrlCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setThreadName_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("threadName");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #15
Source File: BsWebAuthenticationCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setProtocolScheme_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("protocolScheme");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #16
Source File: BsFileConfigCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setMaxAccessCount_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("maxAccessCount");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #17
Source File: BsKeyMatchCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setVirtualHost_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("virtualHost");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #18
Source File: BsRelatedQueryCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setUpdatedTime_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("updatedTime");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #19
Source File: BsFileConfigCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setIncludedDocPaths_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("includedDocPaths");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #20
Source File: BsRoleTypeCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setUpdatedBy_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("updatedBy");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #21
Source File: BsFileConfigCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setExcludedDocPaths_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("excludedDocPaths");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #22
Source File: BsWebConfigCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setConfigParameter_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("configParameter");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #23
Source File: BsPathMappingCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setRegex_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("regex");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #24
Source File: BsFileConfigCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setCreatedTime_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("createdTime");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #25
Source File: BsKeyMatchCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setQuery_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("query");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #26
Source File: BsScheduledJobCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setCronExpression_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("cronExpression");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #27
Source File: BsFileConfigCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setBoost_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("boost");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #28
Source File: BsAccessTokenCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setCreatedTime_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("createdTime");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #29
Source File: BsThumbnailQueueCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setCreatedBy_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("createdBy");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}
 
Example #30
Source File: BsBadWordCQ.java    From fess with Apache License 2.0 4 votes vote down vote up
public void setUpdatedBy_Exists(ConditionOptionCall<ExistsQueryBuilder> opLambda) {
    ExistsQueryBuilder builder = regExistsQ("updatedBy");
    if (opLambda != null) {
        opLambda.callback(builder);
    }
}