I've just blogged a set-up that works, based on the foreach and postMethod tasks in the ant-contrib package: http://www.wallandbinkley.com/quaedam/?p=99 . Thanks to Erik, Thorsten and Steve Loughran for guidance on this! I tried the http antlib from the Ant sandbox, but couldn't get it to work. I haven't looked at Thorsten's Forrest code yet. Sure, a compiled pipeline would be great, but I'm not in a hurry yet. But having Bess and Erik collaborate sounds like the ideal solution to all my problems. I'll start a list. Peter
________________________________ From: Thorsten Scherler [mailto:[EMAIL PROTECTED] Sent: Thu 2/1/2007 2:18 PM To: solr-user@lucene.apache.org Subject: Re: Posting from Ant On Thu, 2007-02-01 at 16:48 -0500, Erik Hatcher wrote: > 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. I wrote something like this. http://wiki.apache.org/solr/SolrForrest I am using it in my project in an ant task that will call the forrest site target and request the indexing actions url (e.g. index.solr.add.do) http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.solr/ salu2 > > 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] > >>>>> > >>>>> > >>> > >>> > -- Thorsten Scherler thorsten.at.apache.org Open Source Java & XML consulting, training and solutions