mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@343888 c90b9560-bf6c-de11-be94-00142212c4b1
201 lines
5.5 KiB
XML
201 lines
5.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
|
|
<refentry xml:id="solrclient.getbyids" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>SolrClient::getByIds</refname>
|
|
<refpurpose>Get Documents by their Ids. Utilizes Solr Realtime Get (RTG)</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <type>SolrQueryResponse</type><methodname>SolrClient::getByIds</methodname>
|
|
<methodparam><type>array</type><parameter>ids</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Get Documents by their Ids. Utilizes Solr Realtime Get (RTG).
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>ids</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Document ids
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
<type>SolrQueryResponse</type>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title><function>SolrClient::getByIds</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
include "bootstrap.php";
|
|
|
|
$options = array
|
|
(
|
|
'hostname' => SOLR_SERVER_HOSTNAME,
|
|
'login' => SOLR_SERVER_USERNAME,
|
|
'password' => SOLR_SERVER_PASSWORD,
|
|
'port' => SOLR_SERVER_PORT,
|
|
'path' => SOLR_SERVER_PATH
|
|
);
|
|
|
|
$client = new SolrClient($options);
|
|
$response = $client->getByIds(['GB18030TEST', '6H500F0']);
|
|
|
|
print_r($response->getResponse());
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
SolrObject Object
|
|
(
|
|
[response] => SolrObject Object
|
|
(
|
|
[numFound] => 2
|
|
[start] => 0
|
|
[docs] => Array
|
|
(
|
|
[0] => SolrObject Object
|
|
(
|
|
[id] => GB18030TEST
|
|
[name] => Array
|
|
(
|
|
[0] => Test with some GB18030 encoded characters
|
|
)
|
|
|
|
[features] => Array
|
|
(
|
|
[0] => No accents here
|
|
[1] => 这是一个功能
|
|
[2] => This is a feature (translated)
|
|
[3] => 这份文件是很有光泽
|
|
[4] => This document is very shiny (translated)
|
|
)
|
|
|
|
[price] => Array
|
|
(
|
|
[0] => 0
|
|
)
|
|
|
|
[inStock] => Array
|
|
(
|
|
[0] => 1
|
|
)
|
|
|
|
[_version_] => 1510294336239042560
|
|
)
|
|
|
|
[1] => SolrObject Object
|
|
(
|
|
[id] => 6H500F0
|
|
[name] => Array
|
|
(
|
|
[0] => Maxtor DiamondMax 11 - hard drive - 500 GB - SATA-300
|
|
)
|
|
|
|
[manu] => Array
|
|
(
|
|
[0] => Maxtor Corp.
|
|
)
|
|
|
|
[manu_id_s] => maxtor
|
|
[cat] => Array
|
|
(
|
|
[0] => electronics
|
|
[1] => hard drive
|
|
)
|
|
|
|
[features] => Array
|
|
(
|
|
[0] => SATA 3.0Gb/s, NCQ
|
|
[1] => 8.5ms seek
|
|
[2] => 16MB cache
|
|
)
|
|
|
|
[price] => Array
|
|
(
|
|
[0] => 350
|
|
)
|
|
|
|
[popularity] => Array
|
|
(
|
|
[0] => 6
|
|
)
|
|
|
|
[inStock] => Array
|
|
(
|
|
[0] => 1
|
|
)
|
|
|
|
[store] => Array
|
|
(
|
|
[0] => 45.17614,-93.87341
|
|
)
|
|
|
|
[manufacturedate_dt] => 2006-02-13T15:26:37Z
|
|
[_version_] => 1510294336449806336
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</refsect1>
|
|
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<simplelist>
|
|
<member><methodname>SolrClient::getById</methodname></member>
|
|
</simplelist>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|