Field input/output (FIT) transformer API

Use the field input/output transformer API as an option to the input/output transformer support in Apache Solr™. An Introduction to DSE Field Transformers provides details on the transformer classes.

DSE Search includes the released version of a plugin API for Solr updates and a plugin to the CassandraDocumentReader. The plugin API transforms data from the secondary indexing API before data is submitted. The plugin to the CassandraDocumentReader transforms the results data from the database to DSE Search.

Using the API, applications can tweak a Solr Document before it is mapped and indexed according to the schema.xml. The API is a counterpart to the input/output transformer support in Solr.

The field input transformer (FIT) requires:

  • name="dse"

  • A trailing Z for date field values

Procedure

To use the API:

  1. Define the plugin in the top level <config> element in the solrconfig.xml for a table (search core).

    <config>
    ...
    <fieldInputTransformer name="dse" class="
      com.datastax.bdp.cassandra.index.solr.functional.
      BinaryFieldInputTransformer">
    </fieldInputTransformer>
    
    <fieldOutputTransformer name="dse" class="
      com.datastax.bdp.cassandra.index.solr.functional.
      BinaryFieldOutputTransformer">
    </fieldOutputTransformer>
    ...
    </config>
  2. Write a transformer class something like this reference implementation to tweak the data in some way.

  3. Export the class to a JAR file. You must place the JAR file in this location:

    • Tarball installations: <install-location>/resources/solr/lib

    • Package installations: /usr/share/dse/solr/lib

    The JAR is added to the CLASSPATH automatically.

  4. Test your implementation using something like the reference implementation.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com