Peter - here's some information on an antlib that does HTTP POST.
Though it appears to only post a single file as well, so you'd still
need a wrapper iteration to achieve posting of an entire directory of
files.
Erik
Begin forwarded message:
From: Steve Loughran <[EMAIL PROTECTED]>
Date: February 1, 2007 2:52:24 AM EST
To: Erik Hatcher <[EMAIL PROTECTED]>
Subject: Re: Posting from Ant
yes, there is an antlib (not released, you need to build it yourself)
that does posts, including http forms posting.
http://svn.apache.org/viewvc/ant/sandbox/antlibs/http/trunk/
On 01/02/07, Erik Hatcher <[EMAIL PROTECTED]> wrote:
Steve,
Know of any HTTP POST tasks that could take a directory .xml files
and post them to Solr? We do it with curl like this, with Solr's
post.sh:
FILES=$*
URL=http://localhost:8983/solr/update
for f in $FILES; do
echo Posting file $f to $URL
curl $URL --data-binary @$f -H 'Content-type:text/xml;
charset=utf-8'
echo
done
#send the commit command to make sure all the changes are flushed
and visible
curl $URL --data-binary '<commit/>'
But something more Ant-centric would be tasty.
Thanks,
Erik
Begin forwarded message:
> From: "Binkley, Peter" <[EMAIL PROTECTED]>
> Date: January 31, 2007 1:56:06 PM EST
> To: <solr-user@lucene.apache.org>
> Subject: Posting from Ant
> Reply-To: solr-user@lucene.apache.org
>
> Is there an Ant task out there somewhere that can POST bunches of
> files
> to Solr, doing what the post.sh script does but with filesets?
>
> I've found the http post task
> (http://antelope.tigris.org/nonav/docs/manual/bk03ch17.html),
but it
> just posts name-value pairs, not files; and Slide's set of webdav
> client
> tasks
> (http://gulus.usherbrooke.ca/pub/appl/apache/jakarta/slide/
binaries/
> jaka
> rta-slide-ant-webdav-bin-2.1.zip) has PUT and GET but not POST. It
> shouldn't be hard to adapt one of these, but something pre-existing
> would be better.
>
> Peter
>
> Peter Binkley
> Digital Initiatives Technology Librarian
> Information Technology Services
> 4-30 Cameron Library
> University of Alberta Libraries
> Edmonton, Alberta
> Canada T6G 2J8
> Phone: (780) 492-3743
> Fax: (780) 492-9243
> e-mail: [EMAIL PROTECTED]