I am converting a SOLR 4.10 db to SOLR 7.1
In 4.10, I have a field that is an expiration date, that I limit the scope of SOLR queries with, so I created an index field of type date, with a copy field, into a field in the output.
<field name="IDX_ExpirationDate" type="date" indexed="true" stored="false" multiValued="true" />
<field name="ExpirationDate" type = "date" indexed = "true" stored = "true" />
<copyField source="ExpirationDate" dest="IDX_ExpirationDate"/>
Using the schema above in 4.10, when I run a query, I get ExpirationDate in the results as expected.
{
...
"ExpirationDate":"2015-09-29T00:00:00Z",
...
}
SOLR 7.1 got rid of the type "date" and replaced it with a type called "pdate", so I made the change in the 7.1 schema (only changed date to pdate)
<field name="IDX_ExpirationDate" type="pdate" indexed="true" stored="false" multiValued="true" />
<field name="ExpirationDate" type = "pdate" indexed = "true" stored = "true" />
<copyField source="ExpirationDate" dest="IDX_ExpirationDate"/>
Now when I run SOLR 7.1 queries, i see both ExpirationDate and IDX_ExpirationDate in the results, and what's worse, its adding square braces around the date. (I'm viewing the results in json). So basically there are 2 problems. First IDX_ExpirationDate shouldnt be in the results because the "stored" attribute in the schema is false. Second, the square brackets treats the date like an array instead of a date, and fails JSON deserialization.
{
...
"ExpirationDate":"2015-09-29T00:00:00Z",
"IDX_ExpirationDate":["2015-09-29T00:00:00Z"],
...
}
Is there a setting that has changed since 4.10 that would cause this to appear? Or is there an extra attribute I need to set?
I have other IDX_ items but they are all type="text_general" instead of pdate - and they dont appear in the query results.