You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by bi...@apache.org on 2006/03/23 00:36:06 UTC

svn commit: r387973 - in /incubator/solr/trunk/src/scripts: abc abo commit optimize readercycle

Author: billa
Date: Wed Mar 22 15:35:59 2006
New Revision: 387973

URL: http://svn.apache.org/viewcvs?rev=387973&view=rev
Log:
corrected wrong url for curl

Modified:
    incubator/solr/trunk/src/scripts/abc
    incubator/solr/trunk/src/scripts/abo
    incubator/solr/trunk/src/scripts/commit
    incubator/solr/trunk/src/scripts/optimize
    incubator/solr/trunk/src/scripts/readercycle

Modified: incubator/solr/trunk/src/scripts/abc
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/abc?rev=387973&r1=387972&r2=387973&view=diff
==============================================================================
--- incubator/solr/trunk/src/scripts/abc (original)
+++ incubator/solr/trunk/src/scripts/abc Wed Mar 22 15:35:59 2006
@@ -85,7 +85,7 @@
 logMessage command: $0 $@
 
 logMessage sending commit to Solr server at port ${solr_port}
-rs=`curl http://localhost:${solr_port}/update -s -d "<commit/>"`
+rs=`curl http://localhost:${solr_port}/solr/update -s -d "<commit/>"`
 if [[ $? != 0 ]]
 then
   logMessage failed to connect to Solr server at port ${solr_port}

Modified: incubator/solr/trunk/src/scripts/abo
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/abo?rev=387973&r1=387972&r2=387973&view=diff
==============================================================================
--- incubator/solr/trunk/src/scripts/abo (original)
+++ incubator/solr/trunk/src/scripts/abo Wed Mar 22 15:35:59 2006
@@ -85,7 +85,7 @@
 logMessage command: $0 $@
 
 logMessage sending optimize to Solr server at port ${solr_port}
-rs=`curl http://localhost:${solr_port}/update -s -d "<optimize/>"`
+rs=`curl http://localhost:${solr_port}/solr/update -s -d "<optimize/>"`
 if [[ $? != 0 ]]
 then
   logMessage failed to connect to Solr server at port ${solr_port}

Modified: incubator/solr/trunk/src/scripts/commit
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/commit?rev=387973&r1=387972&r2=387973&view=diff
==============================================================================
--- incubator/solr/trunk/src/scripts/commit (original)
+++ incubator/solr/trunk/src/scripts/commit Wed Mar 22 15:35:59 2006
@@ -70,7 +70,7 @@
 logMessage started by $oldwhoami
 logMessage command: $0 $@
 
-rs=`curl http://localhost:${solr_port}/update -s -d "<commit/>"`
+rs=`curl http://localhost:${solr_port}/solr/update -s -d "<commit/>"`
 if [[ $? != 0 ]]
 then
   logMessage failed to connect to Solr server at port ${solr_port}

Modified: incubator/solr/trunk/src/scripts/optimize
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/optimize?rev=387973&r1=387972&r2=387973&view=diff
==============================================================================
--- incubator/solr/trunk/src/scripts/optimize (original)
+++ incubator/solr/trunk/src/scripts/optimize Wed Mar 22 15:35:59 2006
@@ -71,7 +71,7 @@
 logMessage started by $oldwhoami
 logMessage command: $0 $@
 
-rs=`curl http://localhost:${solr_port}/update -s -d "<optimize/>"`
+rs=`curl http://localhost:${solr_port}/solr/update -s -d "<optimize/>"`
 if [[ $? != 0 ]]
 then
   logMessage failed to connect to Solr server at port ${solr_port}

Modified: incubator/solr/trunk/src/scripts/readercycle
URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/readercycle?rev=387973&r1=387972&r2=387973&view=diff
==============================================================================
--- incubator/solr/trunk/src/scripts/readercycle (original)
+++ incubator/solr/trunk/src/scripts/readercycle Wed Mar 22 15:35:59 2006
@@ -71,7 +71,7 @@
 logMessage started by $oldwhoami
 logMessage command: $0 $@
 
-rs=`curl http://localhost:${solr_port}/update -s -d "<commit/>"`
+rs=`curl http://localhost:${solr_port}/solr/update -s -d "<commit/>"`
 if [[ $? != 0 ]]
 then
   logMessage failed to connect to Solr server at port ${solr_port}



Re: svn commit: r387973 - in /incubator/solr/trunk/src/scripts: abc abo commit optimize readercycle

Posted by Bill Au <bi...@gmail.com>.
Yes, I am making the hostname and webapp name in the curl command line
configurable.  I just wanted to point out that some of the scripts do a
little more
than being only a wrapper to curl.

Bill

On 3/24/06, Chris Hostetter <ho...@fucit.org> wrote:
>
>
> : The scripts as they are written now only acts on a local Solr
> server.  Some
> : of the
> : scripts are more than just a wrapper to curl to post XML to a Solr
> server.
> : For example,
> : a couple of the scripts also backup the index directory.  If we want the
>
>
> I know ... but even if the script must be run localy on the server, people
> may want to configure their server with host based rules, or access
> controls by path -- they should be able to set ENV variables (or command
> line args) to override the entire URL.
>
>
>
>
> : > On Mar 23, 2006, at 4:32 PM, Chris Hostetter wrote:
> : > > regardless of the seperate thread about support for multiple
> : > > indexes and
> : > > how thta might change the URL, we should probably make the URLs
> : > > used by
> : > > all of hte scripts completely configurable (not just the port, but
> : > > everything up to the webapp context) ...
> : > >
> : > >  1) people might want to change the webapp name (ie: rename the war)
> : >
> : > In fact if you build Solr from source, you end up with solr-1.0.war,
> : > and it must be renamed to match the examples anyway to solr.war when
> : > deployed.  Unless I'm missing something.
> : >
> : > >  2) for scripts like optimize/commit people might want to run them
> : > > from
> : > >     remote hosts (so hardcoding "localhost" would be bad).
> : > >  3) even for scripts that only make sense when run on localhost (ie:
> : > >     making backups) people may configure their appserver to block
> : > > reuqests
> : > >     that don't use a specific hostname, or have certain
> authentication
> : > >     information -- ie: only allow/commits updates if the
> : > >     update-solr.internal.domain hostname is used, or only allow
> : > > updates to
> : > >     a particular user/password pair (i *think* curl supports
> : > >     http://user:pass@host.com/path urls ... right?)
> : >
> : > I'm in the midst of learning Solr and prototyping with it to replace
> : > my much less feature rich custom XML-RPC search server.  When I get
> : > to the point of leveraging the command-line scripts, I'll likely
> : > write my own Ruby versions of them and would be happy to contribute
> : > those if they come to life.  I'd make all the pieces parameterizable,
> : > and agree that should be the case for the shell scripts as well.
> : >
> : >         Erik
> : >
> : >
> :
>
>
>
> -Hoss
>
>

Re: svn commit: r387973 - in /incubator/solr/trunk/src/scripts: abc abo commit optimize readercycle

Posted by Chris Hostetter <ho...@fucit.org>.
: The scripts as they are written now only acts on a local Solr server.  Some
: of the
: scripts are more than just a wrapper to curl to post XML to a Solr server.
: For example,
: a couple of the scripts also backup the index directory.  If we want the


I know ... but even if the script must be run localy on the server, people
may want to configure their server with host based rules, or access
controls by path -- they should be able to set ENV variables (or command
line args) to override the entire URL.




: > On Mar 23, 2006, at 4:32 PM, Chris Hostetter wrote:
: > > regardless of the seperate thread about support for multiple
: > > indexes and
: > > how thta might change the URL, we should probably make the URLs
: > > used by
: > > all of hte scripts completely configurable (not just the port, but
: > > everything up to the webapp context) ...
: > >
: > >  1) people might want to change the webapp name (ie: rename the war)
: >
: > In fact if you build Solr from source, you end up with solr-1.0.war,
: > and it must be renamed to match the examples anyway to solr.war when
: > deployed.  Unless I'm missing something.
: >
: > >  2) for scripts like optimize/commit people might want to run them
: > > from
: > >     remote hosts (so hardcoding "localhost" would be bad).
: > >  3) even for scripts that only make sense when run on localhost (ie:
: > >     making backups) people may configure their appserver to block
: > > reuqests
: > >     that don't use a specific hostname, or have certain authentication
: > >     information -- ie: only allow/commits updates if the
: > >     update-solr.internal.domain hostname is used, or only allow
: > > updates to
: > >     a particular user/password pair (i *think* curl supports
: > >     http://user:pass@host.com/path urls ... right?)
: >
: > I'm in the midst of learning Solr and prototyping with it to replace
: > my much less feature rich custom XML-RPC search server.  When I get
: > to the point of leveraging the command-line scripts, I'll likely
: > write my own Ruby versions of them and would be happy to contribute
: > those if they come to life.  I'd make all the pieces parameterizable,
: > and agree that should be the case for the shell scripts as well.
: >
: >         Erik
: >
: >
:



-Hoss


Re: svn commit: r387973 - in /incubator/solr/trunk/src/scripts: abc abo commit optimize readercycle

Posted by Bill Au <bi...@gmail.com>.
I do see the name of the webapp being changed so I will make that
cofigurable
via a command line option.  Chris, is that what you mean by running run them
from
remote hosts?  Or do you mean the scirpts should act on a remote Solr
server?

The scripts as they are written now only acts on a local Solr server.  Some
of the
scripts are more than just a wrapper to curl to post XML to a Solr server.
For example,
a couple of the scripts also backup the index directory.  If we want the
scripts to act
on a remote Solr server, one can always use a remote shell to execute the
scripts locally
on the remove Solr server.

Bill

On 3/24/06, Erik Hatcher <er...@ehatchersolutions.com> wrote:
>
>
> On Mar 23, 2006, at 4:32 PM, Chris Hostetter wrote:
> > regardless of the seperate thread about support for multiple
> > indexes and
> > how thta might change the URL, we should probably make the URLs
> > used by
> > all of hte scripts completely configurable (not just the port, but
> > everything up to the webapp context) ...
> >
> >  1) people might want to change the webapp name (ie: rename the war)
>
> In fact if you build Solr from source, you end up with solr-1.0.war,
> and it must be renamed to match the examples anyway to solr.war when
> deployed.  Unless I'm missing something.
>
> >  2) for scripts like optimize/commit people might want to run them
> > from
> >     remote hosts (so hardcoding "localhost" would be bad).
> >  3) even for scripts that only make sense when run on localhost (ie:
> >     making backups) people may configure their appserver to block
> > reuqests
> >     that don't use a specific hostname, or have certain authentication
> >     information -- ie: only allow/commits updates if the
> >     update-solr.internal.domain hostname is used, or only allow
> > updates to
> >     a particular user/password pair (i *think* curl supports
> >     http://user:pass@host.com/path urls ... right?)
>
> I'm in the midst of learning Solr and prototyping with it to replace
> my much less feature rich custom XML-RPC search server.  When I get
> to the point of leveraging the command-line scripts, I'll likely
> write my own Ruby versions of them and would be happy to contribute
> those if they come to life.  I'd make all the pieces parameterizable,
> and agree that should be the case for the shell scripts as well.
>
>         Erik
>
>

Re: svn commit: r387973 - in /incubator/solr/trunk/src/scripts: abc abo commit optimize readercycle

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 23, 2006, at 4:32 PM, Chris Hostetter wrote:
> regardless of the seperate thread about support for multiple  
> indexes and
> how thta might change the URL, we should probably make the URLs  
> used by
> all of hte scripts completely configurable (not just the port, but
> everything up to the webapp context) ...
>
>  1) people might want to change the webapp name (ie: rename the war)

In fact if you build Solr from source, you end up with solr-1.0.war,  
and it must be renamed to match the examples anyway to solr.war when  
deployed.  Unless I'm missing something.

>  2) for scripts like optimize/commit people might want to run them  
> from
>     remote hosts (so hardcoding "localhost" would be bad).
>  3) even for scripts that only make sense when run on localhost (ie:
>     making backups) people may configure their appserver to block  
> reuqests
>     that don't use a specific hostname, or have certain authentication
>     information -- ie: only allow/commits updates if the
>     update-solr.internal.domain hostname is used, or only allow  
> updates to
>     a particular user/password pair (i *think* curl supports
>     http://user:pass@host.com/path urls ... right?)

I'm in the midst of learning Solr and prototyping with it to replace  
my much less feature rich custom XML-RPC search server.  When I get  
to the point of leveraging the command-line scripts, I'll likely  
write my own Ruby versions of them and would be happy to contribute  
those if they come to life.  I'd make all the pieces parameterizable,  
and agree that should be the case for the shell scripts as well.

	Erik


Re: svn commit: r387973 - in /incubator/solr/trunk/src/scripts: abc abo commit optimize readercycle

Posted by Chris Hostetter <ho...@fucit.org>.
regardless of the seperate thread about support for multiple indexes and
how thta might change the URL, we should probably make the URLs used by
all of hte scripts completely configurable (not just the port, but
everything up to the webapp context) ...

 1) people might want to change the webapp name (ie: rename the war)
 2) for scripts like optimize/commit people might want to run them from
    remote hosts (so hardcoding "localhost" would be bad).
 3) even for scripts that only make sense when run on localhost (ie:
    making backups) people may configure their appserver to block reuqests
    that don't use a specific hostname, or have certain authentication
    information -- ie: only allow/commits updates if the
    update-solr.internal.domain hostname is used, or only allow updates to
    a particular user/password pair (i *think* curl supports
    http://user:pass@host.com/path urls ... right?)


: Date: Wed, 22 Mar 2006 23:36:06 -0000
: From: billa@apache.org
: Reply-To: solr-dev@lucene.apache.org
: To: solr-commits@lucene.apache.org
: Subject: svn commit: r387973 - in /incubator/solr/trunk/src/scripts: abc
:     abo commit optimize readercycle
:
: Author: billa
: Date: Wed Mar 22 15:35:59 2006
: New Revision: 387973
:
: URL: http://svn.apache.org/viewcvs?rev=387973&view=rev
: Log:
: corrected wrong url for curl
:
: Modified:
:     incubator/solr/trunk/src/scripts/abc
:     incubator/solr/trunk/src/scripts/abo
:     incubator/solr/trunk/src/scripts/commit
:     incubator/solr/trunk/src/scripts/optimize
:     incubator/solr/trunk/src/scripts/readercycle
:
: Modified: incubator/solr/trunk/src/scripts/abc
: URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/abc?rev=387973&r1=387972&r2=387973&view=diff
: ==============================================================================
: --- incubator/solr/trunk/src/scripts/abc (original)
: +++ incubator/solr/trunk/src/scripts/abc Wed Mar 22 15:35:59 2006
: @@ -85,7 +85,7 @@
:  logMessage command: $0 $@
:
:  logMessage sending commit to Solr server at port ${solr_port}
: -rs=`curl http://localhost:${solr_port}/update -s -d "<commit/>"`
: +rs=`curl http://localhost:${solr_port}/solr/update -s -d "<commit/>"`
:  if [[ $? != 0 ]]
:  then
:    logMessage failed to connect to Solr server at port ${solr_port}
:
: Modified: incubator/solr/trunk/src/scripts/abo
: URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/abo?rev=387973&r1=387972&r2=387973&view=diff
: ==============================================================================
: --- incubator/solr/trunk/src/scripts/abo (original)
: +++ incubator/solr/trunk/src/scripts/abo Wed Mar 22 15:35:59 2006
: @@ -85,7 +85,7 @@
:  logMessage command: $0 $@
:
:  logMessage sending optimize to Solr server at port ${solr_port}
: -rs=`curl http://localhost:${solr_port}/update -s -d "<optimize/>"`
: +rs=`curl http://localhost:${solr_port}/solr/update -s -d "<optimize/>"`
:  if [[ $? != 0 ]]
:  then
:    logMessage failed to connect to Solr server at port ${solr_port}
:
: Modified: incubator/solr/trunk/src/scripts/commit
: URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/commit?rev=387973&r1=387972&r2=387973&view=diff
: ==============================================================================
: --- incubator/solr/trunk/src/scripts/commit (original)
: +++ incubator/solr/trunk/src/scripts/commit Wed Mar 22 15:35:59 2006
: @@ -70,7 +70,7 @@
:  logMessage started by $oldwhoami
:  logMessage command: $0 $@
:
: -rs=`curl http://localhost:${solr_port}/update -s -d "<commit/>"`
: +rs=`curl http://localhost:${solr_port}/solr/update -s -d "<commit/>"`
:  if [[ $? != 0 ]]
:  then
:    logMessage failed to connect to Solr server at port ${solr_port}
:
: Modified: incubator/solr/trunk/src/scripts/optimize
: URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/optimize?rev=387973&r1=387972&r2=387973&view=diff
: ==============================================================================
: --- incubator/solr/trunk/src/scripts/optimize (original)
: +++ incubator/solr/trunk/src/scripts/optimize Wed Mar 22 15:35:59 2006
: @@ -71,7 +71,7 @@
:  logMessage started by $oldwhoami
:  logMessage command: $0 $@
:
: -rs=`curl http://localhost:${solr_port}/update -s -d "<optimize/>"`
: +rs=`curl http://localhost:${solr_port}/solr/update -s -d "<optimize/>"`
:  if [[ $? != 0 ]]
:  then
:    logMessage failed to connect to Solr server at port ${solr_port}
:
: Modified: incubator/solr/trunk/src/scripts/readercycle
: URL: http://svn.apache.org/viewcvs/incubator/solr/trunk/src/scripts/readercycle?rev=387973&r1=387972&r2=387973&view=diff
: ==============================================================================
: --- incubator/solr/trunk/src/scripts/readercycle (original)
: +++ incubator/solr/trunk/src/scripts/readercycle Wed Mar 22 15:35:59 2006
: @@ -71,7 +71,7 @@
:  logMessage started by $oldwhoami
:  logMessage command: $0 $@
:
: -rs=`curl http://localhost:${solr_port}/update -s -d "<commit/>"`
: +rs=`curl http://localhost:${solr_port}/solr/update -s -d "<commit/>"`
:  if [[ $? != 0 ]]
:  then
:    logMessage failed to connect to Solr server at port ${solr_port}
:
:



-Hoss