You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Saurabh Sethi <sa...@sendgrid.com> on 2017/06/16 00:24:38 UTC
Query not working with DatePointField
Hi,
We have a fieldType specified for date. Earlier it was using TrieDateField
and we changed it to DatePointField.
<fieldType name="dateType" class="solr.TrieDateField"
sortMissingLast="true" precisionStep="6"/>
<fieldType name="dateType" class="solr.DatePointField" />
Here are the fields used in the query and one of them uses the dateType:
<field name="field1" omitNorms="true" type="stringType" indexed="true"
stored="false" required="true" multiValued="false"/>
<field name="field2" omitNorms="true" type="dateType" indexed="true"
stored="false" docValues="false" />
<field name="field3" omitNorms="true" type="stringType" indexed="true"
stored="false" multiValued="true" />
The following query was returning correct results when the field type was
Trie but not with Point:
field1:value1 AND ((*:* NOT field2:*) AND field3:value3)
Any idea why field2:* does not return results anymore?
Thanks,
Saurabh
Re: Query not working with DatePointField
Posted by Tomas Fernandez Lobbe <tf...@apple.com>.
The query field:* doesn't work with point fields (numerics or dates), only exact or range queries are supported, so an equivalent query would be field:[* TO *]
Sent from my iPhone
> On Jun 15, 2017, at 5:24 PM, Saurabh Sethi <sa...@sendgrid.com> wrote:
>
> Hi,
>
> We have a fieldType specified for date. Earlier it was using TrieDateField
> and we changed it to DatePointField.
>
> <fieldType name="dateType" class="solr.TrieDateField"
> sortMissingLast="true" precisionStep="6"/>
>
> <fieldType name="dateType" class="solr.DatePointField" />
>
> Here are the fields used in the query and one of them uses the dateType:
>
> <field name="field1" omitNorms="true" type="stringType" indexed="true"
> stored="false" required="true" multiValued="false"/>
> <field name="field2" omitNorms="true" type="dateType" indexed="true"
> stored="false" docValues="false" />
> <field name="field3" omitNorms="true" type="stringType" indexed="true"
> stored="false" multiValued="true" />
>
> The following query was returning correct results when the field type was
> Trie but not with Point:
>
> field1:value1 AND ((*:* NOT field2:*) AND field3:value3)
>
> Any idea why field2:* does not return results anymore?
>
> Thanks,
> Saurabh