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

search for in the

SwishResult->getMetaList> <Swish->prepare
Last updated: Fri, 20 May 2011

view this page in

Swish->query

(PECL swish >= 0.1.0)

Swish->queryExecute a query and return results object

Descripción

object Swish->query ( string $query )
Warning

Esta función ha sido declarada EXPERIMENTAL. Su comportamiento, su nombre y la documentación que le acompaña puede cambiar sin previo aviso en futuras versiones de PHP. Use esta función bajo su propio riesgo.

A quick method to execute a search with default parameters.

Parámetros

query

Query string.

Valores devueltos

Returns SwishResults object.

Errores/Excepciones

Throws SwishException on error.

Ejemplos

Example #1 Basic Swish->query() example

<?php

try {

    
$swish = new Swish("index.swish-e");
    
$results $swish->query("test query");

    echo 
"Found: "$results->hits" hits\n";

} catch (
SwishException $e) {
    echo 
$e->getMessage(), "\n";
}

?>

El resultado del ejemplo sería algo similar a:

Found: 1 hits



add a note add a note User Contributed Notes Swish->query
There are no user contributed notes for this page.

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