Examples of FullTextDocBuilder


Examples of org.springframework.data.mongodb.core.query.TextQueryTests.FullTextDoc.FullTextDocBuilder

   */
  @Test
  public void shouldApplySortByScoreCorrectly() {

    initWithDefaultDocuments();
    FullTextDoc coffee2 = new FullTextDocBuilder().headline("coffee").build();
    template.insert(coffee2);

    List<FullTextDoc> result = template.find(new TextQuery("bake coffee cake").sortByScore(), FullTextDoc.class);
    assertThat(result, hasSize(4));
    assertThat(result.get(0), anyOf(equalTo(BAKE), equalTo(coffee2)));
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.