solr - Why is SolrJ not returning copy-fields? - Stack Overflow

I'm fetching a document by id using SolrJ, like this:HashMap<String,String> params = new Ha

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

相关推荐

  • solr - Why is SolrJ not returning copy-fields? - Stack Overflow

    I'm fetching a document by id using SolrJ, like this:HashMap<String,String> params = new Ha

    7天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信