[ 
https://issues.apache.org/jira/browse/SOLR-11441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16194254#comment-16194254
 ] 

Dawid Weiss commented on SOLR-11441:
------------------------------------

I successfully ran the command mentioned in the issue -- no problems (see 
below). 

{code}
C:\_tmp\solr-7.0.0>bin\solr start -e techproducts -Dsolr.ltr.enabled=true
Creating Solr home directory C:\_tmp\solr-7.0.0\example\techproducts\solr

Starting up Solr on port 8983 using command:
"C:\_tmp\solr-7.0.0\bin\solr.cmd" start -p 8983 -s 
"C:\_tmp\solr-7.0.0\example\techproducts\solr" -Dsolr.ltr.enabled=true

Waiting up to 30 to see Solr running on port 8983

Copying configuration to new core instance directory:
C:\_tmp\solr-7.0.0\example\techproducts\solr\techproducts

Creating new core 'techproducts' using command:
http://localhost:8983/solr/admin/cores?action=CREATE&name=techproducts&instanceDir=techproducts

Started Solr server on port 8983. Happy searching!
{
  "responseHeader":{
    "status":0,
    "QTime":10199},
  "core":"techproducts"}


Indexing tech product example docs from C:\_tmp\solr-7.0.0\example\exampledocs
SimplePostTool version 5.0.0
Posting files to [base] url http://localhost:8983/solr/techproducts/update 
using content-type application/xml...
POSTing file gb18030-example.xml to [base]
POSTing file hd.xml to [base]
POSTing file ipod_other.xml to [base]
POSTing file ipod_video.xml to [base]
POSTing file manufacturers.xml to [base]
POSTing file mem.xml to [base]
POSTing file money.xml to [base]
POSTing file monitor.xml to [base]
POSTing file monitor2.xml to [base]
POSTing file mp500.xml to [base]
POSTing file sd500.xml to [base]
POSTing file solr.xml to [base]
POSTing file utf8-example.xml to [base]
POSTing file vidcard.xml to [base]
14 files indexed.
COMMITting Solr index changes to 
http://localhost:8983/solr/techproducts/update...
Time spent: 0:00:00.545

Solr techproducts example launched successfully. Direct your Web browser to 
http://localhost:8983/solr to visit the Solr Admin UI
{code}

The user has a slash in her {{solr/bin}}; this won't find solr command when 
executed in {{cmd}}; I think she had powershell instead and indeed the script 
fails then:

{code}
PS C:\_tmp\solr-7.0.0> bin/solr start -e techproducts -Dsolr.ltr.enabled=true

Invalid command-line option: true
{code}



> windows shell splits args on "=" so we should consider updating our docs to 
> always quote args like -Dfoo=bar or improve bin/solr.cmd to account for this
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-11441
>                 URL: https://issues.apache.org/jira/browse/SOLR-11441
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: documentation, scripts and tools
>         Environment: Windows 10, possible other versions as well (presumably 
> not when running cygwin?)
>            Reporter: Hoss Man
>
> confusing exchange with a user on freenode#solr led to this discovery...
> {noformat}
> 14:07 < sara_:#solr> New question: bin/solr start -e techproducts 
> -Dsolr.ltr.enabled=true
> 14:07 < sara_:#solr> gave me invalid command-line option:true
> 14:07 < sara_:#solr> anyone knows why?
> ...
> 15:02 < sara_:#solr> i have 6.6.1 @elyograg
> 15:03 < sara_:#solr> mine is a windows 10 machine
> ...
> 15:28 < sara_:#solr> @elyograg i just downloaded solr-7.0.0 and ran bin/solr 
> start -e techproducts -Dsolr.ltr.enabled=true
> 15:28 < sara_:#solr> it still gave me invalid command-line
> ...
> 15:29 <@hoss:#solr> sara_: the only thing i can think of is that windows 10 
> is splitting your command line on '=' ? ... can you try 
>                     quoting the entire command line arg so the script gets 
> the entire -Dsolr.ltr.enabled=true ? (not sure how to quote 
>                     strings in the windows command shell -- i would assume 
> "-Dsolr.ltr.enabled=true"
> 15:32 <@hoss:#solr> sigh ... yes, aparently windows things "=" is a shell 
> delimiter: https://ss64.com/nt/syntax-esc.html
> 15:33 <@hoss:#solr> s/shell delimiter/parameter delimiter in shell commands/
> 15:33 < sara_:#solr> you are genius!
> 15:34 < sara_:#solr> you and elyograg. you guys are fantastic. Saving me from 
> looking at the cmd script or shell script....
> 15:34 <@hoss:#solr> sara_: do i have your permission to copy/paste this 
> exchange into our bug tracker as a note about updating our docs 
>                     (and maybe making the solr.cmd smart enough to handle 
> this) ?
> 15:45 < sara_:#solr> sure of course
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to