在项目中执行solr查询时,查询结果对应多个对象,但值都是null。程序执行的过程中没有报错,查询结果如下:
{"code":"0","message":"数据获取成功!","result":[{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null},{"uid":null,"head":null,"name":null,"gender":null,"genderText":null,"company":null,"position":null,"positionText":null,"labels":null,"joinYear":null,"joinYearText":"无工作年限","region":null,"regionText":null,"isFirend":null,"interests":null,"skill":null}],"obj":null,"dateTime":"2017-11-11 17:06:32"}
但是,将solr查询接口复制一份到另外一个工程中,查询没有任何问题,可以查到数据,并且显示没问题。
你这问题没头没尾,没人能解答的了。
写的太着急,详细问题已经粘贴出来了,希望大神帮忙看一下,刚接触solr,很多内容还在学习阶段
@shaoyp: 这个我感觉好像和solr没太大关系,你这输出的应该是你自己对原始solr响应加工后的结果了吧。