Solr Installation and create new collection – standalone

By | October 12, 2017
Note: I am running this in Windows.

  1. Download Solr
    Download Solr from here
    I have downloaded solr-7.0.1: http://mirrors.whoishostingthis.com/apache/lucene/solr/7.0.1/solr-7.0.1.zip

    For this example, we will extract it to the folder C:\Users\Public\hadoop_ecosystem\solr-7.0.1

  2. Start Solr
    Open command prompt and type below commands

    > c:
    > cd C:\Users\Public\hadoop_ecosystem\solr-7.0.1\bin
    C:\Users\Public\hadoop_ecosystem\solr-7.0.1\bin> solr start -p 8983
    Output:
    Waiting up to 30 to see Solr running on port 8983
    Started Solr server on port 8983. Happy searching!
    

    Note: Solr has started with port 8983

  3. Access Solr
    Access Solr: http://localhost:8983/

  4. Create new collection
    Create new collection with name ‘collection1’

    C:\Users\Public\hadoop_ecosystem\solr-7.0.1\bin> solr create -c collection1
    Output:
    WARNING: Using _default configset. Data driven schema functionality is enabled b
    y default, which is
             NOT RECOMMENDED for production use.
             To turn it off:
                curl http://localhost:8983/solr/collection1/config -d '{"set-user-pr
    operty": {"update.autoCreateFields":"false"}}'
    
    Copying configuration to new core instance directory:
    C:\Users\Public\hadoop_ecosystem\solr-7.0.1\server\solr\collection1
    
    Creating new core 'collection1' using command:
    http://localhost:8983/solr/admin/cores?action=CREATE&name=collection1&instanceDi
    r=collection1
    
    {
      "responseHeader":{
        "status":0,
        "QTime":8520},
      "core":"collection1"}
    
  5. General Solr commands
    Check whether Solr is running:

    C:\Users\Public\hadoop_ecosystem\solr-7.0.1\bin>solr -i
    
    Found Solr process 11108 running on port 8983
    {
      "solr_home":"C:\\Users\\Public\\hadoop_ecosystem\\solr-7.0.1\\server\\solr",
      "version":"7.0.1 8d6c3889aa543954424d8ac1dbb3f03bf207140b - sarowe - 2017-10-0
    2 14:39:33",
      "startTime":"2017-10-13T20:46:34.563Z",
      "uptime":"0 days, 0 hours, 29 minutes, 18 seconds",
      "memory":"81.4 MB (%16.6) of 490.7 MB"}
    

Leave a Reply

Your email address will not be published. Required fields are marked *