On 11/13/2019 10:45 AM, rhys J wrote:
If you use DateRangeField instead of DatePointField for your field's
class, then you can indeed use partial timestamps for both indexing and
querying. This only works with DateRangeField.
I don't see that as an option in the API? Do I need to change what pdate's
type is in the managed-schema for it to take effect?
As in:
<fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
to
<fieldType name="pdate" class="solr.DateRangeField" docValues="true"/>
You could do it that way ... but instead, I'd create a new fieldType,
not change an existing one. The existing name is "pdate" which implies
"point date". I would probably go with "daterange" or "rdate" as the
name, but that is completely up to you.
Note that trying to use an existing index with a new schema is not going
to work. You're going to need to delete the old index and build it
again after you change the schema.
Thanks,
Shawn