http://localhost:1985/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on&wt=json     solr的http请求后加一个wt参数  返回则是text/plain的json字符串。

如下图所示:

让Solr返回JSON数据

默认的是返回xml数据,将以上请求参数的wt去掉或者wt=xml,即可得xml数据,请求如:http://localhost:1985/solr/select/?q=*%3A*&version=2.2&start=0&rows=10&indent=on&wt=xml   结果如下图:

让Solr返回JSON数据

 

相关文章:

  • 2021-09-10
  • 2022-02-12
  • 2021-12-09
  • 2021-07-25
  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-16
  • 2022-02-17
  • 2022-12-23
  • 2022-01-17
  • 2021-07-22
  • 2021-05-04
相关资源
相似解决方案