DisMaxQParser (Solr 3.6.2 API)
Keywords: org.apache.solr.search.DisMaxQParser class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.search
Class DisMaxQParser

    java.lang.Object
      org.apache.solr.search.QParser
          org.apache.solr.search.DisMaxQParser

    public class DisMaxQParser

extends QParser

Query parser for dismax queries

Note: This API is experimental and may change in non backward-compatible ways in the future

Version:
  $Id: DisMaxQParser.java 1306151 2012-03-28 04:19:31Z dsmiley $

Field Summary
`protected QParser` | `altQParser`
`protected Query` | `altUserQuery`
`protected String[]` | `boostParams`
`protected List<Query>` | `boostQueries`
`protected Query` | `parsedUserQuery`
`protected Map<String,Float>` | `queryFields`

Fields inherited from class org.apache.solr.search.QParser
`localParams, localParamsEnd, params, qstr, query, recurseCount, req, stringIncludingLocalParams, valFollowedParams`

Constructor Summary
`DisMaxQParser(String qstr, SolrParams localParams, SolrParams params, SolrQueryRequest req)`

Method Summary
`protected void` | `addBoostFunctions(BooleanQuery query, SolrParams solrParams)`
`protected void` | `addBoostQuery(BooleanQuery query, SolrParams solrParams)`
`void` | `addDebugInfo(NamedList<Object> debugInfo)`
`protected boolean` | `addMainQuery(BooleanQuery query, SolrParams solrParams)` Adds the main query to the query argument.
`protected Query` | `getAlternateUserQuery(SolrParams solrParams)`
`String[]` | `getDefaultHighlightFields()`
`Query` | `getHighlightQuery()`
`protected SolrPluginUtils.DisjunctionMaxQueryParser` | `getParser(Map<String,Float> fields, String paramName, SolrParams solrParams, float tiebreaker)`
`protected Query` | `getPhraseQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser pp)`
`protected Query` | `getUserQuery(String userQuery, SolrPluginUtils.DisjunctionMaxQueryParser up, SolrParams solrParams)`
`Query` | `parse()` Create and return the `Query` object represented by `qstr`.

Methods inherited from class org.apache.solr.search.QParser
`getLocalParams, getParam, getParams, getParser, getQuery, getReq, getSort, getString, setLocalParams, setParams, setReq, setString, subQuery`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### queryFields

    protected Map<String,Float> queryFields

### parsedUserQuery

    protected Query parsedUserQuery

### boostParams

    protected String[] boostParams

### boostQueries

    protected List<Query> boostQueries

### altUserQuery

    protected Query altUserQuery

### altQParser

    protected QParser altQParser

Constructor Detail

### DisMaxQParser

    public DisMaxQParser(String qstr,
                         SolrParams localParams,
                         SolrParams params,
                         SolrQueryRequest req)

Method Detail

### parse

    public Query parse()
                throws ParseException

  Description copied from class: `QParser`
  Create and return the `Query` object represented by `qstr`. Null MAY be returned to signify there was no input (e.g. no query string) to parse.

  Specified by:
    `parse` in class `QParser`
  Throws:
    `ParseException`
  See Also:
    `QParser.getQuery()`

### addBoostFunctions

    protected void addBoostFunctions(BooleanQuery query,
                                     SolrParams solrParams)
                              throws ParseException

  Throws:
    `ParseException`

### addBoostQuery

    protected void addBoostQuery(BooleanQuery query,
                                 SolrParams solrParams)
                          throws ParseException

  Throws:
    `ParseException`

### addMainQuery

    protected boolean addMainQuery(BooleanQuery query,
                                   SolrParams solrParams)
                            throws ParseException

  Adds the main query to the query argument. If its blank then false is returned.

  Throws:
    `ParseException`

### getAlternateUserQuery

    protected Query getAlternateUserQuery(SolrParams solrParams)
                                   throws ParseException

  Throws:
    `ParseException`

### getPhraseQuery

    protected Query getPhraseQuery(String userQuery,
                                   SolrPluginUtils.DisjunctionMaxQueryParser pp)
                            throws ParseException

  Throws:
    `ParseException`

### getUserQuery

    protected Query getUserQuery(String userQuery,
                                 SolrPluginUtils.DisjunctionMaxQueryParser up,
                                 SolrParams solrParams)
                          throws ParseException

  Throws:
    `ParseException`

### getParser

    protected SolrPluginUtils.DisjunctionMaxQueryParser getParser(Map<String,Float> fields,
                                                                  String paramName,
                                                                  SolrParams solrParams,
                                                                  float tiebreaker)

### getDefaultHighlightFields

    public String[] getDefaultHighlightFields()

  Overrides:
    `getDefaultHighlightFields` in class `QParser`

### getHighlightQuery

    public Query getHighlightQuery()
                            throws ParseException

  Overrides:
    `getHighlightQuery` in class `QParser`
  Throws:
    `ParseException`

### addDebugInfo

    public void addDebugInfo(NamedList<Object> debugInfo)

  Overrides:
    `addDebugInfo` in class `QParser`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD