The benefit to having a <foreach> solution (now I'm beginning to speak like a Rubyist, eh? Ever toyed with Rake, Peter?) is that you can handle errors yourself.

I never really expected the pipeline to be XML files -> XSLT *files* - > HTTP POST -> Solr.

The *files* part here is key. Can't ya get your Cocoon-skinned cap on and roll a pipeline that does it all on the fly with badass compiled style sheet performance, IoC configurable, da works. Right Bess? I'd be happy to collaborate with Bess to wire in a Cocoon kinda Ant task wrapper if the world would be a better place with it.

        Erik

On Feb 1, 2007, at 11:43 AM, Binkley, Peter wrote:

Thanks, I'll try that out. I hope there aren't any encoding issues...
Nah, how likely is that? I'll report back.

Peter

-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 01, 2007 6:38 AM
To: solr-user@lucene.apache.org
Subject: Fwd: Posting from Ant

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