Configuring search index joins

DataStax Enterprise (DSE) supports solr_query joins on the partition key field (_partitionKey). By default, the solr_query join functionality is enabled and DSE indexes the partitioning columns in this additional field. This field, _partitionKey, increases search index size. Disabling joins can decrease the amount of disk space the search indexes uses.

Join settings in the schema

DESCRIBE ACTIVE SEARCH INDEX displays the schema settings of a search index. DSE hides the definition of the _partitionKey when joins are enabled.

If the schema contains a field named _partitionKey, support for joins is:

  • Enabled: attributes docValues and indexed are set to true. For example:

    <field name="_partitionKey" **docValues="true"** **indexed="true"** stored="false" type="StrField"/>
  • Disabled: attributes docValues and indexed are set to false. For example:

    <field **docValues="false"** **indexed="false"** multiValued="false" name="_partitionKey" omitNorms="true" **stored="false"** type="StrField"/>

If the schema contains no field definition for _partitionKey, then joins are enabled.

Enable joins

To enable join on a search index that previously had join disabled, set the _partitionKey, docValues, and indexed attributes to true, reload the schema, and rebuild the index.

Rebuilding the search index on a large dataset might take longer than the default timeout for cqlsh. Before launching cqlsh, you can override the timeout. See Adjusting timeout for index management.

Procedure

  1. Start cqlsh on a node that is running DSE Search.

  2. Set the docValues and indexed attributes to true:

    ALTER SEARCH INDEX SCHEMA ON wiki.solr
    SET field[@name='_partitionKey']@docValues='true';
    ALTER SEARCH INDEX SCHEMA ON wiki.solr
    SET field[@name='_partitionKey']@indexed='true';
  1. Reload the schema to make it active:

    RELOAD SEARCH INDEX ON wiki.solr;
  1. Reload the schema to make it active:

    RELOAD SEARCH INDEX ON wiki.solr;
  2. Rebuild the search index:

    REBUILD SEARCH INDEX ON wiki.solr;

include:disablesJoins.adoc[leveloffset=+1]

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