Hi,

Would like to check, is there any problem with this set of codes from Line
604-614 in solr.cmd for Solr 5.3.0? When using this set of codes, I'm not
able to start solr with it pointing to custom core directories.

IF "%SOLR_HOME%"=="" set "SOLR_HOME=%SOLR_SERVER_DIR%\solr"

IF NOT EXIST "%SOLR_HOME%\" (

  IF EXIST "%SOLR_SERVER_DIR%\%SOLR_HOME%" (

    set "SOLR_HOME=%SOLR_SERVER_DIR%\%SOLR_HOME%"

  ) ELSE IF EXIST "%cd%\%SOLR_HOME%" (

    set "SOLR_HOME=%cd%\%SOLR_HOME%"

  ) ELSE (

    set "SCRIPT_ERROR=EDM home directory %SOLR_HOME% not found!"

    goto err

  )

)


I replace it with the following and it works.

IF "%SOLR_HOME%"=="" set "SOLR_HOME=%SOLR_SERVER_DIR%\solr"

IF EXIST "%SOLR_HOME%\" (

  IF EXIST "%SOLR_SERVER_DIR%\%SOLR_HOME%" (

    set "SOLR_HOME=%SOLR_SERVER_DIR%\%SOLR_HOME%"

  ) ELSE IF EXIST "%cd%\%SOLR_HOME%" (

    set "SOLR_HOME=%cd%\%SOLR_HOME%"

  ) ELSE (

    set "SCRIPT_ERROR=EDM home directory %SOLR_HOME% not found!"

    goto err

  )

)

The problem seems to be that both the IF "%SOLR_HOME%"=="" and IF NOT EXIST
"%SOLR_HOME%\" mean the same thing, and thus the code didn't called the
custom directory. I replace it with IF EXIST "%SOLR_HOME%\"  for the 2nd
line (removing the 'NOT').

The script which I used to startup is:
bin\solr.cmd start -cloud -p 8983 -s solrMain\node1\solr -m 12g -z
"localhost:2181,localhost:2182,localhost:2183"

Hope we can clarify some doubts here.

Regards,
Edwin

Reply via email to