我正在学习 solr 但有太多的歧义。
This is solr response:
http://94.229.169.64:8983/solr/collection1/search-en?q=craft%20base&wt=json
如何将内容放入新页面
我曾尝试使用 PHP Solarium,但反应不一样。
// create a client instance
$client = new Solarium_Client();
// get a select query instance
$query = $client->createSelect();
// set a query (all prices starting from 12)
$query->setQuery('craft base');
// set start and rows param (comparable to SQL limit) using fluent interface
$query->setStart(1)->setRows(20);
// set fields to fetch (this overrides the default setting 'all fields')
//$query->setFields(array('id','name','price'));
// sort the results by price ascending
$query->addSort('price', Solarium_Query_Select::SORT_ASC);
// this executes the query and returns the result
$resultset = $client->select($query);
// display the total number of documents found by solr
echo 'NumFound: '.$resultset->getNumFound(); // result = 182
但是当你点击上面的 solr URL 时,结果是 31。
你能告诉我如何得到 solr 响应吗?
谢谢