[ https://issues.apache.org/jira/browse/SOLR-14859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jason Gerlowski updated SOLR-14859: ----------------------------------- Attachment: SOLR-14859.patch Status: Open (was: Open) Thanks for helping lay out an approach here guys. I've attached a patch which tries to follow that. No tests yet, but I'll add those once we agree where we want to log vs throw errors. Some notes: * The added logic lives in AbstractSpatialPrefixTreeFieldType so that it fires for all field types which use PrefixTreeStrategy, not just DateRangeField. * The patch uses {{setArgs}} to check the fieldType declaration. There we log warnings on any explicit fieldType options that contradict the hardcoded FieldType, and we set property defaults that match the FieldType. * The patch uses {{checkSchemaField}} to check the field declaration. Unlike {{setArgs}} which lets us modify the fieldType-properties, {{checkSchemaField}} doesn't have a great way to modify the SchemaField (afaict), so I had to settle for throwing SolrException's there. * I don't love the inconsistency between the two bullet points above - it seems wrong to warn-and-correct bad {{<fieldType>}} settings but throw exceptions when those same bad settings exist on the {{<field>}}. Should we throw errors on both cases? Or if we'd prefer to warn-and-correct on both cases, is there a way to modify the SchemaField to make corrections from within checkSchemaField? * There's a couple NOCOMMIT comments where I'd appreciate feedback from any reviewers. Pending any feedback I'll aim to make the fieldType and field checking consistent by having them both throw SolrExceptions on any explicit settings that contradict the hardcoded FieldType. I'm happy to standardize the other way too though if anyone has suggestions on how to modify the SchemaField from within {{checkSchemaFields}} > [* TO *] queries on DateRange fields miss results > ------------------------------------------------- > > Key: SOLR-14859 > URL: https://issues.apache.org/jira/browse/SOLR-14859 > Project: Solr > Issue Type: Improvement > Security Level: Public(Default Security Level. Issues are Public) > Components: query parsers > Affects Versions: 8.5 > Reporter: Jason Gerlowski > Assignee: Jason Gerlowski > Priority: Major > Attachments: SOLR-14859.patch, SOLR-14859.patch, query-debug.png, > reproduce.sh, schema.png > > > "exists" queries ({{[* TO *]}}) on DateRange fields return 0 results > regardless of docs in the index with values in that field. > The issue appears to be that the query is converted into a > {{NormsFieldExistsQuery}}, even though DateRangeField uses omitNorms=true by > default. Probably introduced by SOLR-11746's changes to these optimizable > range queries. > I've attached a script to reproduce the issue (tested on Solr 8.6.2) and > screenshots showing showing schema and query-parsing info for the > reproduction. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org