Example usage for org.apache.solr.search QParser getHighlightQuery

List of usage examples for org.apache.solr.search QParser getHighlightQuery

Introduction

In this page you can find the example usage for org.apache.solr.search QParser getHighlightQuery.

Prototype

public Query getHighlightQuery() throws SyntaxError 

Source Link

Usage

From source file:com.memonews.solr.handler.component.HighlightQueryComponent.java

License:Apache License

private Query parseAndCleanQuery(final String query, final SolrQueryRequest req, final String defaultType)
        throws ParseException {
    QParser parser = QParser.getParser(query, defaultType, req);
    Query highlightQuery = parser.getHighlightQuery();
    if (LOG.isDebugEnabled()) {
        LOG.debug("Parsed and cleaned query: " + highlightQuery.toString());
    }// w w w .ja  v  a 2s  .  c om
    return highlightQuery;
}