org.apache.solr.search

## Class QParserPlugin

- java.lang.Object
- - org.apache.solr.search.QParserPlugin

- All Implemented Interfaces:
    SolrInfoMBean, NamedListInitializedPlugin
  Direct Known Subclasses:
    BlockJoinParentQParserPlugin, BoostQParserPlugin, CollapsingQParserPlugin, ComplexPhraseQParserPlugin, DisMaxQParserPlugin, ExportQParserPlugin, ExtendedDismaxQParserPlugin, FieldQParserPlugin, FunctionQParserPlugin, FunctionRangeQParserPlugin, GraphQParserPlugin, GraphTermsQParserPlugin, HashQParserPlugin, IGainTermsQParserPlugin, JoinQParserPlugin, LuceneQParserPlugin, MLTQParserPlugin, NestedQParserPlugin, OldLuceneQParserPlugin, PrefixQParserPlugin, RawQParserPlugin, ReRankQParserPlugin, ScoreJoinQParserPlugin, SimpleQParserPlugin, SpatialFilterQParserPlugin, SurroundQParserPlugin, SwitchQParserPlugin, TermQParserPlugin, TermsQParserPlugin, TextLogisticRegressionQParserPlugin, XmlQParserPlugin

      public abstract class QParserPlugin
      extends Object
      implements NamedListInitializedPlugin, SolrInfoMBean

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.solr.core.SolrInfoMBean

      `SolrInfoMBean.Category`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_QTYPE` internal use - name of the default parser
    `static Map<String,Class<? extends QParserPlugin>>` | `standardPlugins` Internal use - name to class mappings of builtin parsers.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `QParserPlugin()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract QParser` | `createParser(String qstr, SolrParams localParams, SolrParams params, SolrQueryRequest req)` return a `QParser`
    `SolrInfoMBean.Category` | `getCategory()` Purpose of this Class
    `String` | `getDescription()` Simple one or two line description
    `URL[]` | `getDocs()` Documentation URL list.
    `String` | `getName()` Simple common usage name, e.g.
    `String` | `getSource()` CVS Source, SVN Source, etc
    `NamedList` | `getStatistics()` Any statistics this instance would like to be publicly available via the Solr Administration interface.
    `String` | `getVersion()` Simple common usage version, e.g.
    `void` | `init(NamedList args)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_QTYPE

          public static final String DEFAULT_QTYPE

      internal use - name of the default parser
      See Also:
        Constant Field Values

    - #### standardPlugins

          public static final Map<String,Class<? extends QParserPlugin>> standardPlugins

      Internal use - name to class mappings of builtin parsers. Each query parser plugin extending `QParserPlugin` has own instance of standardPlugins. This leads to cyclic dependencies of static fields and to case when NAME field is not yet initialized. This result to NPE during initialization. For every plugin, listed here, NAME field has to be final and static.

  - ### Constructor Detail

    - #### QParserPlugin

          public QParserPlugin()

  - ### Method Detail

    - #### createParser

          public abstract QParser createParser(String qstr,
                                               SolrParams localParams,
                                               SolrParams params,
                                               SolrQueryRequest req)

      return a `QParser`

    - #### init

          public void init(NamedList args)

      Specified by:
        `init` in interface `NamedListInitializedPlugin`

    - #### getName

          public String getName()

      Description copied from interface: `SolrInfoMBean`
      Simple common usage name, e.g. BasicQueryHandler, or fully qualified clas name.
      Specified by:
        `getName` in interface `SolrInfoMBean`

    - #### getVersion

          public String getVersion()

      Description copied from interface: `SolrInfoMBean`
      Simple common usage version, e.g. 2.0
      Specified by:
        `getVersion` in interface `SolrInfoMBean`

    - #### getDescription

          public String getDescription()

      Description copied from interface: `SolrInfoMBean`
      Simple one or two line description
      Specified by:
        `getDescription` in interface `SolrInfoMBean`

    - #### getCategory

          public SolrInfoMBean.Category getCategory()

      Description copied from interface: `SolrInfoMBean`
      Purpose of this Class
      Specified by:
        `getCategory` in interface `SolrInfoMBean`

    - #### getSource

          public String getSource()

      Description copied from interface: `SolrInfoMBean`
      CVS Source, SVN Source, etc
      Specified by:
        `getSource` in interface `SolrInfoMBean`

    - #### getDocs

          public URL[] getDocs()

      Description copied from interface: `SolrInfoMBean`
      Documentation URL list.

      Suggested documentation URLs: Homepage for sponsoring project, FAQ on class usage, Design doc for class, Wiki, bug reporting URL, etc...

      Specified by:
        `getDocs` in interface `SolrInfoMBean`

    - #### getStatistics

          public NamedList getStatistics()

      Description copied from interface: `SolrInfoMBean`
      Any statistics this instance would like to be publicly available via the Solr Administration interface.

      Any Object type may be stored in the list, but only the `toString()` representation will be used.

      Specified by:
        `getStatistics` in interface `SolrInfoMBean`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.