You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by e8en <eb...@tokobagus.com> on 2010/08/09 07:03:11 UTC

how to commit certain xml files using PHP commit()

I'm solr newbie,
I use my PHP script to delete index and commit certain xml file in solr

this is what I do:
$solr->deleteByQuery('ITEM_CAT:576');
$solr->commit();

the question is, how to commit certain xml file, for example to do this:
java -jar post.jar cat_576.xml

please help me
thanks before :)
-- 
View this message in context: http://lucene.472066.n3.nabble.com/how-to-commit-certain-xml-files-using-PHP-commit-tp1050988p1050988.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: how to commit certain xml files using PHP commit()

Posted by Paul Dhaliwal <su...@gmail.com>.
I am not sure if the php client supports updates via xml files. If it
doesn't, you probably need to use php curl to submit the file.

You can see regular curl usage here:
http://wiki.apache.org/solr/UpdateXmlMessages and
http://wiki.apache.org/solr/UpdateCSV

I imagine you would use CURLOPT_INFILE to send the xml file to solr.

hth,
Paul
*
*
On Sun, Aug 8, 2010 at 10:03 PM, e8en <eb...@tokobagus.com> wrote:

>
> I'm solr newbie,
> I use my PHP script to delete index and commit certain xml file in solr
>
> this is what I do:
> $solr->deleteByQuery('ITEM_CAT:576');
> $solr->commit();
>
> the question is, how to commit certain xml file, for example to do this:
> java -jar post.jar cat_576.xml
>
> please help me
> thanks before :)
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/how-to-commit-certain-xml-files-using-PHP-commit-tp1050988p1050988.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>