Example usage for org.springframework.data.solr.core.query Query setDefType

List of usage examples for org.springframework.data.solr.core.query Query setDefType

Introduction

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

Prototype

void setDefType(String defType);

Source Link

Document

Sets the default type to be used by the query.

Usage

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

@Test
public void testCloneWithDefType() {
    Query source = new SimpleQuery(new Criteria("field_1").is("value_1"));
    source.setDefType("defType");

    Query destination = SimpleQuery.fromQuery(source);
    Assert.assertEquals(source.getDefType(), destination.getDefType());
}