php getbyid,PHP: SolrClient::getByIds - Manual

示例 #1 SolrClient::getByIds() example

('hostname'=>SOLR_SERVER_HOSTNAME,'login'=>SOLR_SERVER_USERNAME,'password'=>SOLR_SERVER_PASSWORD,'port'=>SOLR_SERVER_PORT,'path'=>SOLR_SERVER_PATH);$client= newSolrClient($options);$response=$client->getByIds(['GB18030TEST','6H500F0']);print_r($response->getResponse());?>

以上例程的输出类似于:

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

)

)

)

)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值