I'm fetching a document by id using SolrJ, like this:
HashMap<String,String> params = new HashMap<String,String>();
params.put("fl", "*");
SolrDocument doc = solr.getById(documentId, new MapSolrParams(params));
The SolrDocument coming back, when printed just using .toString()
, contains all of the "real" fields of the document such as "id", "version", etc. but it does not include any of the several "copy fields" I have defined.
When using the Solr web interface, searching for this document from the "Query" screen returns all fields, including the copy-fields.
I tried adding fl=*
to the parameters, but that didn't change the behavior.
I changed my code to perform a search for id:[document-id]
and all fields are returned as expected.
Is there something else I need to add to my getById
call in order to return all fields?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743767094a4503674.html
评论列表(0条)