Package org.springframework.data.solr.core.query

Examples of org.springframework.data.solr.core.query.SimpleUpdateField


    toInsert.setCategory(Arrays.asList("nosql"));
    solrTemplate.saveBean(toInsert);
    solrTemplate.commit();

    PartialUpdate update = new PartialUpdate("id", DEFAULT_BEAN_ID);
    update.add(new SimpleUpdateField("cat", "spring-data-solr", UpdateAction.ADD));
    solrTemplate.saveBean(update);
    solrTemplate.commit();

    Assert.assertEquals(1, solrTemplate.count(ALL_DOCUMENTS_QUERY));
View Full Code Here


    toInsert.setPopularity(10);
    solrTemplate.saveBean(toInsert);
    solrTemplate.commit();

    PartialUpdate update = new PartialUpdate("id", DEFAULT_BEAN_ID);
    update.add(new SimpleUpdateField("popularity", 1, UpdateAction.INC));
    solrTemplate.saveBean(update);
    solrTemplate.commit();

    Assert.assertEquals(1, solrTemplate.count(ALL_DOCUMENTS_QUERY));
View Full Code Here

TOP

Related Classes of org.springframework.data.solr.core.query.SimpleUpdateField

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.