Documentation Home

Solr 7 Migration

Solrj API changes

  • Creating a collection
    • Was: new CollectionAdminRequest.Create().setCollectionName(collectionName).setNumShards(numShards).setConfigName(solrConfigName)
    • Now: CollectionAdminRequest.create(collectionName, solrConfigName, numShards, numReplicas)
  • Creating a collection alias
    • Was: new CollectionAdminRequest.CreateAlias().setAliasName(reindex.getDefaultCollection()).setAliasedCollections(collectionName)
    • Now: CollectionAdminRequest.createAlias(aliasName, collectionName)
  • Creating collection reload
    • Was: new CollectionAdminRequest.Reload().setCollectionName(collectionName);
    • Now: CollectionAdminRequest.reloadCollection(collectionName);
  • CloudSolrClient#getZkStateReader().getClusterState().getCollections() has been removed
    • Methods available as replacement: ClusterState#hasCollection, ClusterState#getCollectionsMap, ClusterState#getCollectionStates, and ClusterState#getCollectionOrNull
  • CloudSolrClient contructors changed
    • Now it takes a CloudSolrClient#Builder object
  • GenericSolrRequest api change
    • Was: Set content using GenericSolrRequest#setContentStreams
    • Now: Set content using GenericSolrRequest#setContentWriter

Solr config changes

  • All Trie fields now Point fields
    • precisionStep has been removed
  • solr.WordDelimiterFilterFactory now solr.WordDelimiterGraphFilterFactory
  • solr.SynonymFilterFactory now solr.SynonymGraphFilterFactory
  • solr.ManagedSynonymFilterFactory now solr.ManagedSynonymGraphFilterFactory
  • All graph filter factories used in indexing must be followed by solr.FlattenGraphFilterFactory in the index analyzer

Migration

  • Migrating your Solr server is not required but it is advised since there's no guarantee that all Solrj 7 APIs will communicate correctly with a Solr 5 server
  • Recommended that you do a full reindex regardless if you're upgrading your Solr server or not.