限定输出
通过 “numFound”:3608 我们知道一共有 3608 个结果,我们可以通过参数限定输出,默认情况下影响输出的参数是以下默认值
Parameter | Value |
---|---|
start | 0 |
rows | 10 |
fl | *:* |
我们修改一下以它们的值
q=foundation 搜索关键字 foundation
fl=id 只返回 id
start=30 开始为第 30 条
rows=5 只返回 5 条
代码语言:javascript复制[root@h102 solr-5.3.0]# curl "http://localhost:8983/solr/gettingstarted/select?wt=json&indent=true&q=foundation&fl=id&start=30&rows=5"
{
"responseHeader":{
"status":0,
"QTime":19,
"params":{
"fl":"id",
"indent":"true",
"start":"30",
"q":"foundation",
"wt":"json",
"rows":"5"}},
"response":{"numFound":3608,"start":30,"maxScore":0.05791749,"docs":[
{
"id":"/data/solr/solr-5.3.0/docs/solr-uima/deprecated-list.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-analysis-extras/constant-values.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-analysis-extras/deprecated-list.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-clustering/org/apache/solr/handler/clustering/carrot2/class-use/LuceneCarrot2StemmerFactory.html"},
{
"id":"/data/solr/solr-5.3.0/docs/solr-clustering/org/apache/solr/handler/clustering/carrot2/class-use/LuceneCarrot2TokenizerFactory.html"}]
}}
[root@h102 solr-5.3.0]#