You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2017/07/06 15:47:19 UTC
[3/3] lucene-solr:branch_7_0: SOLR-9526: fix javadocs
SOLR-9526: fix javadocs
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/5e7fa4ce
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/5e7fa4ce
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/5e7fa4ce
Branch: refs/heads/branch_7_0
Commit: 5e7fa4ceee8f31fcf90254e96d1476281faa922b
Parents: 257883d
Author: Steve Rowe <sa...@apache.org>
Authored: Thu Jul 6 11:46:21 2017 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Thu Jul 6 11:46:57 2017 -0400
----------------------------------------------------------------------
.../AddSchemaFieldsUpdateProcessorFactory.java | 51 ++++++++++++--------
1 file changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5e7fa4ce/solr/core/src/java/org/apache/solr/update/processor/AddSchemaFieldsUpdateProcessorFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/processor/AddSchemaFieldsUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/AddSchemaFieldsUpdateProcessorFactory.java
index 92774e6..1f00e67 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/AddSchemaFieldsUpdateProcessorFactory.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/AddSchemaFieldsUpdateProcessorFactory.java
@@ -74,52 +74,61 @@ import static org.apache.solr.core.ConfigSetProperties.IMMUTABLE_CONFIGSET_ARG;
* </p>
* <p>
* This processor takes as configuration a sequence of zero or more "typeMapping"-s from
- * one or more "valueClass"-s, specified as either an <arr> of <str>, or
- * multiple <str> with the same name, to an existing schema "fieldType".
+ * one or more "valueClass"-s, specified as either an <code><arr></code> of
+ * <code><str></code>, or multiple <code><str></code> with the same name,
+ * to an existing schema "fieldType".
* </p>
* <p>
* If more than one "valueClass" is specified in a "typeMapping", field values with any
* of the specified "valueClass"-s will be mapped to the specified target "fieldType".
* The "typeMapping"-s are attempted in the specified order; if a field value's class
* is not specified in a "valueClass", the next "typeMapping" is attempted. If no
- * "typeMapping" succeeds, then the specified "defaultFieldType" is used.
+ * "typeMapping" succeeds, then either the "typeMapping" configured with
+ * <code><bool name="default">true</bool></code> is used, or if none is so
+ * configured, the <code>lt;str name="defaultFieldType">...</str></code> is
+ * used.
+ * </p>
+ * <p>
+ * Zero or more "copyField" directives may be included with each "typeMapping", using a
+ * <code><lst></code>. The copy field source is automatically set to the new field
+ * name; "dest" must specify the destination field or dynamic field in a
+ * <code><str></code>; and "maxChars" may optionally be specified in an
+ * <code><int></code>.
* </p>
* <p>
* Example configuration:
* </p>
*
* <pre class="prettyprint">
- * <processor class="solr.AddSchemaFieldsUpdateProcessorFactory">
- * <str name="defaultFieldType">text_general</str>
- * <lst name="typeMapping">
- * <str name="valueClass">Boolean</str>
- * <str name="fieldType">booleans</str>
- * </lst>
+ * <updateProcessor class="solr.AddSchemaFieldsUpdateProcessorFactory" name="add-schema-fields">
* <lst name="typeMapping">
- * <str name="valueClass">Integer</str>
- * <str name="fieldType">pints</str>
+ * <str name="valueClass">java.lang.String</str>
+ * <str name="fieldType">text_general</str>
+ * <lst name="copyField">
+ * <str name="dest">*_str</str>
+ * <int name="maxChars">256</int>
+ * </lst>
+ * <!-- Use as default mapping instead of defaultFieldType -->
+ * <bool name="default">true</bool>
* </lst>
* <lst name="typeMapping">
- * <str name="valueClass">Float</str>
- * <str name="fieldType">pfloats</str>
+ * <str name="valueClass">java.lang.Boolean</str>
+ * <str name="fieldType">booleans</str>
* </lst>
* <lst name="typeMapping">
- * <str name="valueClass">Date</str>
+ * <str name="valueClass">java.util.Date</str>
* <str name="fieldType">pdates</str>
* </lst>
* <lst name="typeMapping">
- * <str name="valueClass">Long</str>
- * <str name="valueClass">Integer</str>
+ * <str name="valueClass">java.lang.Long</str>
+ * <str name="valueClass">java.lang.Integer</str>
* <str name="fieldType">plongs</str>
* </lst>
* <lst name="typeMapping">
- * <arr name="valueClass">
- * <str>Double</str>
- * <str>Float</str>
- * </arr>
+ * <str name="valueClass">java.lang.Number</str>
* <str name="fieldType">pdoubles</str>
* </lst>
- * </processor></pre>
+ * </updateProcessor></pre>
*/
public class AddSchemaFieldsUpdateProcessorFactory extends UpdateRequestProcessorFactory
implements SolrCoreAware, UpdateRequestProcessorFactory.RunAlways {