Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "PreAnalyzedField" page has been changed by AndrzejBialecki: http://wiki.apache.org/solr/PreAnalyzedField?action=diff&rev1=1&rev2=2 == Configuration options == There is only one configuration parameter, `parserImpl`. The value of this parameter should be a fully qualified class name of a class that implements PreAnalyzedParser interface. The default value of this parameter is `org.apache.solr.schema.JsonPreAnalyzedParser`. + Here's an example of how to define the type and a field that uses this type in `schema.xml`: + {{{ + <types> + ... + <fieldType name="preanalyzed" class="solr.PreAnalyzedField" parserImpl="org.apache.solr.schema.JsonPreAnalyzedParser"/> + ... + </types> + <fields> + ... + <field name="pre" type="preanalyzed" indexed="true" stored="true"/> + ... + </fields> + }}} + + And here's an example XML that adds documents with fields of this type: + + {{{ + <?xml version="1.0" encoding="UTF-8"?> + <add> + <doc> + <field name="id">1</field> + <field name="pre">{"v":"1","str":"document one","tokens":[{"t":"one"},{"t":"two"},{"t":"three","i":100}]}</field> + </doc> + <doc> + <field name="id">2</field> + <field name="pre">{"v":"1","str":"document two","tokens":[{"t":"four"},{"t":"five"},{"t":"six","i":100}]}</field> + </doc> + <doc> + <field name="id">3</field> + <field name="pre">{"v":"1","str":"document three","tokens":[{"t":"seven"},{"t":"eight"},{"t":"nine","i":100}]}</field> + </doc> + </add> + }}} +