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

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

Introduction

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

Prototype

@Nullable
public Integer getFragsize() 

Source Link

Usage

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

@Test
public void testConstructSorlQueryWithHighlightOptionFragsize() {
    SimpleHighlightQuery query = new SimpleHighlightQuery(new SimpleStringCriteria("field_1:value_1"));
    HighlightOptions options = new HighlightOptions();
    options.setFragsize(10);/*from w  w w. ja  v a  2 s  .  com*/
    query.setHighlightOptions(options);

    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
    Assert.assertEquals(options.getFragsize().intValue(), solrQuery.getHighlightFragsize());
}