Example usage for org.springframework.data.solr.core.query HighlightOptions getFormatter

List of usage examples for org.springframework.data.solr.core.query HighlightOptions getFormatter

Introduction

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

Prototype

@Nullable
public String getFormatter() 

Source Link

Usage

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

@Test
public void testConstructSorlQueryWithHighlightOptionFormatter() {
    SimpleHighlightQuery query = new SimpleHighlightQuery(new SimpleStringCriteria("field_1:value_1"));
    HighlightOptions options = new HighlightOptions();
    options.setFormatter("formatter");
    query.setHighlightOptions(options);//from   w ww . j av a2  s.c o  m

    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertEquals(options.getFormatter(), solrQuery.getParams(HighlightParams.FORMATTER)[0]);
}