mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
Added example
-- Provided by Nicolas Wallace (nwallace@fyberstudios.com) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@325705 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
18e80b781b
commit
d39f1fe8ad
1 changed files with 30 additions and 0 deletions
|
@ -52,6 +52,36 @@
|
|||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><methodname>SolrQuery::deleteByQuery</methodname> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$options = array
|
||||
(
|
||||
'hostname' => SOLR_SERVER_HOSTNAME,
|
||||
'login' => SOLR_SERVER_USERNAME,
|
||||
'password' => SOLR_SERVER_PASSWORD,
|
||||
'port' => SOLR_SERVER_PORT,
|
||||
);
|
||||
|
||||
$client = new SolrClient($options);
|
||||
|
||||
//This will erase the entire index
|
||||
$client->deleteByQuery("*:*");
|
||||
$client->commit();
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue