[solr] solr 测试 (python、curl、界面 )

2020-10-29 10:21:28 浏览数 (1)

curl测试:

代码语言:javascript复制
curl http://121.40.86.204:8983/solr/test/select?q=681&rows=20&wt=json&indent=true&fl=*,score
  
或
  
value='echo -n "海蓝之谜" | xxd -ps | tr -d 'n' | sed -r 's/(..)/%1/g' '
echo $value # 张三
 
# 然后用curl传递编码后的参数
curl -G 
--data-urlencode "q=${value}" 
--data-urlencode "rows=20" 
--data-urlencode "wt=json" 
--data-urlencode "indent=true " 
--data-urlencode "fl=*,score " 
"http://121.40.86.204:8983/solr/test/select"



'''
{
  "responseHeader":{
    "status":0,
    "QTime":19,
    "params":{
      "q":"echo -n "海蓝之谜" | xxd -ps | tr -d n | sed -r s/(..)/%1/g ",
      "indent":"true ",
      "rows":"20",
      "wt":"json"}},
  "response":{"numFoun

0 人点赞