IT. Expert System.

PHP

Sends a query to the server


SolrClient::query

(PECL solr >= 0.9.2)

SolrClient::querySends a query to the server

Description

public SolrQueryResponse SolrClient::query ( SolrParams $query )

Sends a query to the server.

Parameters

query

A SolrParam object. It is recommended to use SolrQuery for advanced queries.

Return Values

Returns a SolrQueryResponse object on success and throws a SolrClientException object on failure.

Examples

Example #1 SolrClient::query() example

<?php

include "bootstrap.php";

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

$client = new SolrClient($options);

$query = new SolrQuery();

$query->setQuery('lucene');

$query->setStart(0);

$query->setRows(50);

$query->addField('cat')->addField('features')->addField('id')->addField('timestamp');

$query_response $client->query($query);

$response $query_response->getResponse();

print_r($response);

?>

The above example will output something similar to:

 



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 128 / 158680587. Delta: 0.03550 с