Package org.elasticsearch.action.search

Examples of org.elasticsearch.action.search.MultiSearchResponse$Fields


    public Field$Reflection() {
        super(new ArrayList());
        List list = (List)target();
        for(int i = 0; i < 100; ++i) {
            Object o = new A100$Fields();
            fill(o);
            list.add(o);
        }
    }
View Full Code Here


    // TODO Prepare the second query (matchQuery on "brand" with "HEINEKEN"). We want only one result
    SearchRequestBuilder srb2 = null;
    logger.info("Your 2nd query is : {}", srb2);
   
    // TODO Call the Multisearch API and add the two queries
    MultiSearchResponse sr = null;

    Assert.assertNotNull(sr);
    Assert.assertEquals(2, sr.getResponses().length);

    logger.info("Full json result is: {}", sr.toString());
   

  }
View Full Code Here

        SearchRequestBuilder srb1 = node.client().prepareSearch("meal").setQuery(QueryBuilders.queryString("pale")).setSize(1);
        logger.info("Your 1st query is : {}", srb1);
        SearchRequestBuilder srb2 = node.client().prepareSearch("meal").setQuery(QueryBuilders.matchQuery("brand", "HEINEKEN")).setSize(1);
        logger.info("Your 2nd query is : {}", srb2);

        MultiSearchResponse sr = node.client().prepareMultiSearch()
                .add(srb1)
                .add(srb2)
                .execute().actionGet();

        Assert.assertNotNull(sr);
        Assert.assertEquals(2, sr.getResponses().length);
        long nbHits = 0;
        for (MultiSearchResponse.Item item : sr.getResponses()) {
            SearchResponse response = item.getResponse();
            nbHits += response.getHits().totalHits();
        }

        Assert.assertTrue(nbHits > 0);
        logger.info("Full json result is: {}", sr.toString());


    }
View Full Code Here

    @Override
    protected List<ColumnDefinition> getElements0() throws SQLException {
        List<ColumnDefinition> result = new ArrayList<ColumnDefinition>();

        Rdb$relationFields r = RDB$RELATION_FIELDS.as("r");
        Rdb$fields f = RDB$FIELDS.as("f");

        // Inspiration for the below query was taken from jaybird's
        // DatabaseMetaData implementation
        for (Record record : create().select(
                r.RDB$FIELD_NAME.trim(),
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.search.MultiSearchResponse$Fields

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.