php - Apache solr schema field not displaying in json result -
i using apache solr-5.1.0 searching pdf documents indexed documents using bin/post method.
i added custom field curl
curl -x post -h 'content-type:application/json' --data-binary '{ "add-field":{ "name":"zoneid", "type":"strings", "indexed" : true, "docvalues":true, "stored":true } }' http://localhost:8983/solr/taxsutra/schema
now when invoke search query , zoneid not displaying in json results.
code update index:
curl http://localhost:8983/solr/taxsutra/update/json -h 'content-type:application/json' -d ' [ {"id" : "home/niyuj/projects/php/solr-5.1.0/../itat_src/upload/kolkata/kolkata/24-11-2014/307176844630250930713$5^1refnoita_no._1873.2012.pdf", "zoneid" : "4"}, {"id" : "/home/niyuj/projects/php/solr-5.1.0/../itat_src/upload/kolkata/kolkata/24-11-2014/-421302573392022465313$5^1refnoita-473-kol-2014-mathan-24_11.pdf", "zoneid" : "5"} ]'
i cannot sure information, don't see field in search query results because don't have document values in field. check this, can query: q=zoneid:[* *]
Comments
Post a Comment