[英]Additional fields in schema.xml are not showing up when I do a query
Solr version information: 6.6.0 Solr版本信息:6.6.0
The core is named: solr Instance: /var/solr/data/new_core 核心名为:solr实例:/ var / solr / data / new_core
In the /var/solr/data/new_core/conf/ directory I have a custom schema.xml file 在/ var / solr / data / new_core / conf /目录中,我有一个自定义的schema.xml文件
I have multiple custom fields like this in the schema.xml file 我在schema.xml文件中有多个这样的自定义字段
<field name="nid" type="int" indexed="true" stored="true"/>
When I select the 'solr' core and go to query, these custom fields are not showing up in the results. 当我选择“ solr”核心并进行查询时,这些自定义字段不会显示在结果中。 Here's an example of the results:
这是结果的示例:
{
"response":{"numFound":200,"start":0,"docs":[
{
"id":"koe1eh/node/49",
"site":"https://example.com:1881/",
"hash":"koe1eh",
"ss_language":"und",
"url":"https://example.com:1881/node/49",
"ss_name":"tfadmin",
"tos_name":"tfadmin",
"ss_name_formatted":"tfadmin",
"tos_name_formatted":"tfadmin",
"is_uid":1,
"bs_status":true,
"bs_sticky":false,
"bs_promote":false,
"is_tnid":0,
"bs_translate":false,
"ds_created":"2009-03-12T17:46:06Z",
"ds_changed":"2009-06-18T15:25:33Z",
"ds_last_comment_or_change":"2009-06-18T15:25:33Z",
"tos_content_extra":" (Gifts) ",
"sm_field_apptype":["mousepad"],
"_version_":1588589404094464000,
"timestamp":"2018-01-03T16:28:34Z"}]
}}
The query performed is: http://example.com/solr/solr/select?indent=on&q=*:*&rows=1&wt=json
执行的查询是:
http://example.com/solr/solr/select?indent=on&q=*:*&rows=1&wt=json
: http://example.com/solr/solr/select?indent=on&q=*:*&rows=1&wt=json
=*:*& http://example.com/solr/solr/select?indent=on&q=*:*&rows=1&wt=json
=1& http://example.com/solr/solr/select?indent=on&q=*:*&rows=1&wt=json
solrconfig.xml is here: https://pastebin.com/iVhZCqTW solrconfig.xml在这里: https : //pastebin.com/iVhZCqTW
schema.xml is here: https://pastebin.com/UBaUN5EK schema.xml在这里: https : //pastebin.com/UBaUN5EK
I have tried restarting solr, reloading the core, and reindexing with no effect. 我尝试过重新启动solr,重新加载内核和重新索引均无效。
It turns out that I was just looking at some entries that did not have those fields. 原来,我只是在查看一些没有这些字段的条目。 When I altered my query to start on record 900, then I saw the fields I was looking for.
当我更改查询以从记录900开始时,然后看到了我要查找的字段。 I'm not sure what else I may have done to get this working as I've been trying many different things.
我不确定我在尝试许多不同的事情时还需要做些什么才能使它正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.