Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Solr-以JSON形式返回字段值_Json_Solr - Fatal编程技术网

Solr-以JSON形式返回字段值

Solr-以JSON形式返回字段值,json,solr,Json,Solr,例如 {'name':'Ruth', 'age':28, 'city':'madrid'} 此JSON被索引并存储为字符串。有没有办法在响应中以JSON的形式返回此字段值?在查询结束时添加&wt=JSON,让Solr以JSON格式返回响应。XML是默认值。例如: http://localhost:8080/solr/select?q=*&wt=json 我遇到了这个,它满足了我的要求

例如

{'name':'Ruth', 'age':28, 'city':'madrid'}

此JSON被索引并存储为字符串。有没有办法在响应中以JSON的形式返回此字段值?

在查询结束时添加&wt=JSON,让Solr以JSON格式返回响应。XML是默认值。例如:

http://localhost:8080/solr/select?q=*&wt=json

我遇到了这个,它满足了我的要求