Example usage for org.springframework.data.solr.core.query CalculatedField getFunction

List of usage examples for org.springframework.data.solr.core.query CalculatedField getFunction

Introduction

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

Prototype

Function getFunction();

Source Link

Usage

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

/**
 * Create {@link SolrServer} readable String representation for {@link CalculatedField}.
 * //from  w  w  w .ja va  2s . co  m
 * @param calculatedField
 * @return
 * @since 1.1
 */
protected String createCalculatedFieldFragment(CalculatedField calculatedField) {
    return StringUtils.isNotBlank(calculatedField.getAlias())
            ? (calculatedField.getAlias() + ":" + createFunctionFragment(calculatedField.getFunction(), 0))
            : createFunctionFragment(calculatedField.getFunction(), 0);
}