Filtering point fields filters everything.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Filtering point fields filters everything.

Webster Homer
My company has been using solr for searching our product catalog. We migrated the data from Solr 6.6 to Solr 7.2. I am investigating the changes needed to migrate to Solr 8.*. Our current schema has a number of fields using the trie data types which are deprecated in 7 and gone in 8. I went through the schema and changed the trie fields to their point equivalent.
For example we have these field types and fields defined:
  <fieldType name="pdate" class="solr.DatePointField" docValues="true"/>
  <fieldType name="pdates" class="solr.DatePointField" docValues="true" multiValued="true"/>
  <fieldType name="pdouble" class="solr.DoublePointField" docValues="true"/>
  <fieldType name="pdoubles" class="solr.DoublePointField" docValues="true" multiValued="true"/>
  <fieldType name="pfloat" class="solr.FloatPointField" docValues="true"/>
  <fieldType name="pfloats" class="solr.FloatPointField" docValues="true" multiValued="true"/>
  <fieldType name="pint" class="solr.IntPointField" docValues="true"/>
  <fieldType name="pints" class="solr.IntPointField" docValues="true" multiValued="true"/>
  <fieldType name="plong" class="solr.LongPointField" docValues="true"/>
  <fieldType name="plongs" class="solr.LongPointField" docValues="true" multiValued="true"/>
  <fieldType name="point" class="solr.PointType" subFieldSuffix="_d" dimension="2"/>

<field name="facet_fwght" type="pfloat" indexed="true" stored="true" required="false" multiValued="true" docValues="true" />
<field name="index_date" type="pdate" indexed="true" stored="true" default="NOW" required="false" multiValued="false" docValues="true"/>

These last two were converted from the older types, they were originally defined as:
<field name="facet_fwght" type="tfloat" indexed="true" stored="true" required="false" multiValued="true" docValues="true" />
<field name="index_date" type="date" indexed="true" stored="true" default="NOW" required="false" multiValued="false" docValues="true"/>

In the process of the update I changed the version of the schema
<schema name="deep-product-schema" version="1.6">

And the lucene match version
<luceneMatchVersion>7.2.0</luceneMatchVersion>

After making these changes I created a new collection and used our ETL to load it. We saw no errors during the data load.

The problem I see  is that if I try to filter on facet_fwght I get no results
"fq":"facet_fwght:[100 TO 200]", returns no documents, nor does
facet_fwght:*

Even more bizarre when I used the Admin Console schema browser, it sees the fields but when I try to load the term info for any point field, nothing loads.

On the other hand, I can facet on facet_fwght, I just cannot filter on it. I couldn't get values for index_date either even though every record has it set with the default of NOW

So what am I doing wrong with the point fields? I expected to be able to do just about everything with the point fields I could do with the deprecated trie fields.

Regards,
Webster Homer
This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. If you have received this transmission in error, please notify the sender immediately and delete the message and any attachment from your system. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept liability for any omissions or errors in this message which may arise as a result of E-Mail-transmission or for damages resulting from any unauthorized changes of the content of this message and any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not guarantee that this message is free of viruses and does not accept liability for any damages caused by any virus transmitted therewith. Click http://www.merckgroup.com/disclaimer to access the German, French, Spanish and Portuguese versions of this disclaimer.