Example usage for org.springframework.data.solr.core.query Crotch getField

List of usage examples for org.springframework.data.solr.core.query Crotch getField

Introduction

In this page you can find the example usage for org.springframework.data.solr.core.query Crotch getField.

Prototype

@Override
    public Field getField() 

Source Link

Usage

From source file:org.springframework.data.solr.core.query.CriteriaTests.java

/**
 * @see DATASOLR-105/*from w w w  .  java  2  s  .  c o  m*/
 */
@Test
public void testCrotchShouldReturnFieldNameOfMostRecentSibling() {

    Criteria c1 = new Criteria("field_1").startsWith("start").endsWith("end");
    Criteria c2 = new Criteria("field_2").startsWith("2start");
    Crotch crotch = c1.or(c2);
    Assert.assertThat(crotch.getField().getName(), Is.is("field_2"));
}