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

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

Introduction

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

Prototype

@Override
    public void setDefType(String defType) 

Source Link

Usage

From source file:org.springframework.data.solr.core.DefaultQueryParserTests.java

@Test
public void testWithLuceneDefType() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    query.setDefType("lucene");
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNotNull(solrQuery.get("defType"));
}

From source file:org.springframework.data.solr.core.DefaultQueryParserTests.java

@Test
public void testWithEdismaxDefType() {
    SimpleQuery query = new SimpleQuery(new SimpleStringCriteria("field_1:value_1"));
    query.setDefType("edismax");
    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertNotNull(solrQuery.get("defType"));
}