Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

To ensure a smooth transition from an embedded Solr instance to a standalone one while maintaining data and configuration integrity, follow the steps outlined below:

  1. Download Solr and unzip it parrel to ofbiz-framework 

    /
    ├── ofbiz-framework/
    └── solr-8.11.3/
  2. Stop Solr 
    If Solr standalone is running, need to stop.

    ./home/solr8.11.3/bin/solr stop
  3. Stop OFBiz
    Before starting, stop the embedded Solr instance to prevent data corruption and file lock issues.

    cd /home/ofbiz-framework/
    ./gradlew terminateOfbiz
  4. Copy Core Configuration

    • Navigate to  ${ofbiz.home}/plugins/solr/home/{YourCoreName}  and copy the core configuration. 

    • Paste it into your standalone Solr instance at  solr8.11.3/server/solr/{YourCoreName}
      From ofbiz-framework/   

      # Make sure that the {YourCoreName} directory exists in Solr
      mkdir -p /home/solr8.11.3/server/solr/{YourCoreName}/data/
      cp -r plugins/solr/home/{YourCoreName}/* /home/solr8.11.3/server/solr/{YourCoreName}/
  5. Copy Data

    • Locate the  <dataDir>  tag in solrconfig.xml to identify the existing data directory. By default, it is  ${ofbiz.home}/runtime/indexes/solr/products/.

    • Copy the contents of the data directory and paste them into  solr8.11.3/server/solr/{YourCoreName}/data/.
      From ofbiz-framework/   

      # Make sure the target data directory exists
      mkdir -p /home/solr8.11.3/server/solr/{YourCoreName}/data/
      
      # Copy the index data from OFBiz to your standalone Solr core's data directory
      cp -r runtime/indexes/solr/products/* /home/solr8.11.3/server/solr/{YourCoreName}/data/



  6. Update Data Directory

    • Modify  solr8.11.3/server/solr/{YourCoreName}/conf/solrconfig.xml  to set the appropriate data directory path.

    • To use Solr’s default path, set the following:

      <dataDir>${solr.data.dir:}</dataDir>

    • If you have copied the core data to a custom path, update the path accordingly.
      From ofbiz-framework/ run - 

      sed -i 's|<dataDir>.*</dataDir>|<dataDir>${solr.data.dir:}</dataDir>|' /home/solr8.11.3/server/solr/{YourCoreName}/conf/solrconfig.xml
      grep "<dataDir>" /home/solr8.11.3/server/solr/{YourCoreName}/conf/solrconfig.xml
  7. Start Solr 

    cd /home/solr8.11.3bin/solr start


  • No labels