downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

SolrClient::__destruct> <SolrClient::deleteByQueries
[edit] Last updated: Fri, 17 May 2013

view this page in

SolrClient::deleteByQuery

(PECL solr >= 0.9.2)

SolrClient::deleteByQueryElimina todos los documentos que coincidan con la consulta dada

Descripción

public SolrUpdateResponse SolrClient::deleteByQuery ( string $query )

Elimina todos los documentos que coincidan con la consulta dada.

Parámetros

query

La consulta

Valores devueltos

Devuelve un objeto SolrUpdateResponse en caso de éxito y lanza una excepción SolrClientException en caso de fallo.

Ejemplos

Ejemplo #1 Ejemplo de SolrQuery::deleteByQuery()

<?php

$opciones 
= array
(
    
'hostname' => SOLR_SERVER_HOSTNAME,
    
'login'    => SOLR_SERVER_USERNAME,
    
'password' => SOLR_SERVER_PASSWORD,
    
'port'     => SOLR_SERVER_PORT,
);

$cliente = new SolrClient($opciones);

//Esto borrará el índice por completo
$cliente->deleteByQuery("*:*");
$cliente->commit();

?>

Ver también



add a note add a note User Contributed Notes SolrClient::deleteByQuery - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites