Ok, we have it on good authority that <foreach> is the way to go for Ant -> POST -> Solr.

        Erik


Begin forwarded message:

From: Steve Loughran <[EMAIL PROTECTED]>
Date: February 1, 2007 8:34:33 AM EST
To: Erik Hatcher <[EMAIL PROTECTED]>
Subject: Re: Posting from Ant

On 01/02/07, Erik Hatcher <[EMAIL PROTECTED]> wrote:
cool, thanks.  it only posts a single file, it looks like, but i
suppose the <foreach> ant-contrib task would be the way to go to post
a directory full of .xml files?   or is there now something in ant
that can do that iteration that i'm unaware of?

well, someone could add multifile post, but foreach makes mores sense


woefully ignorant of the latest stuff in ant,
        Erik

On Feb 1, 2007, at 2:52 AM, Steve Loughran wrote:

> 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]
>>
>>



Reply via email to