我需要从 solr 引擎中获取一个 dynamicField (test_*)。我无法获得输出,因为它给出了 nullpointerexception。
Map<String,String> myMap = (Map<String,String>) result1.get(i).getFieldValue("test_*");
QueryResponse response1 = solr.query(query);
SolrDocumentList result1 = response1.getResults(); //result1 is the SolrDocumentList
for(int i=0; i < result1.size();i++){ //get set varaibles }