Examples of StockPriceBuilder


Examples of org.springframework.data.elasticsearch.builder.StockPriceBuilder

    elasticsearchTemplate.createIndex(StockPrice.class);
    elasticsearchTemplate.putMapping(StockPrice.class);
    String symbol = "AU";
    double price = 2.34;
    String id = "abc";
    elasticsearchTemplate.index(new StockPriceBuilder(id).symbol(symbol).price(price).buildIndex());
    elasticsearchTemplate.refresh(StockPrice.class, true);

    SearchQuery searchQuery = new NativeSearchQueryBuilder().withQuery(matchAllQuery()).build();
    List<StockPrice> result = elasticsearchTemplate.queryForList(searchQuery, StockPrice.class);
    //Then
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.