Apache Solr open-source search software
SOLR-11497: add javadocs for XmlQParserPlugin class.
Christine Poerschkef9c066e36ccb
diff --git a/solr/core/src/java/org/apache/solr/search/XmlQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/XmlQParserPlugin.javaindex f71d7eb1e65..26ee523f366 100755--- a/solr/core/src/java/org/apache/solr/search/XmlQParserPlugin.java+++ b/solr/core/src/java/org/apache/solr/search/XmlQParserPlugin.java@@ -29,6 +29,40 @@ import org.apache.solr.common.util.NamedList;import org.apache.solr.request.SolrQueryRequest;import org.apache.solr.schema.IndexSchema;+/**+ * The {@link XmlQParserPlugin} extends the {@link QParserPlugin} and supports the creation of queries from XML.+ *<p>+ * Example:+ * <pre>+<BooleanQuery fieldName="description">+ <Clause occurs="must">+ <TermQuery>shirt</TermQuery>+ </Clause>+ <Clause occurs="mustnot">+ <TermQuery>plain</TermQuery>+ </Clause>+ <Clause occurs="should">+ <TermQuery>cotton</TermQuery>+ </Clause>+ <Clause occurs="must">+ <BooleanQuery fieldName="size">+ <Clause occurs="should">+ <TermsQuery>S M L</TermsQuery>+ </Clause>+ </BooleanQuery>+ </Clause>+</BooleanQuery>+</pre>+ * You can configure your own custom query builders for additional XML elements.+ * The custom builders need to extend the {@link SolrQueryBuilder} or the+ * {@link SolrSpanQueryBuilder} class.+ *<p>+ * Example solrconfig.xml snippet:+ * <pre><queryParser name="xmlparser" class="XmlQParserPlugin">+ <str name="MyCustomQuery">com.mycompany.solr.search.MyCustomQueryBuilder</str>+</queryParser>+</pre>+ */public class XmlQParserPlugin extends QParserPlugin {public static final String NAME = "xmlparser";