[
https://issues.apache.org/jira/browse/SOLR-10891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Rowe updated SOLR-10891:
------------------------------
Attachment: SOLR-10891.patch
tests-failures.txt
Patch that adds a point-based bbox variant field type to TestSolr4Spatial.
I got past a couple of initial problems - you can see in the patch excerpt
below that there is an explicit test for a Trie field, which I replaced with a
check for Numeric field + doc values; and attempting to set the is-stored
property on the Lucene points fieldtype failed because the fieldtype was
already frozen, so I substituted an unfrozen copy first.
{noformat}
index 4d773c96ac..7552176b15 100644
--- a/solr/core/src/java/org/apache/solr/schema/BBoxField.java
+++ b/solr/core/src/java/org/apache/solr/schema/BBoxField.java
@@ -89,8 +89,11 @@ public class BBoxField extends
AbstractSpatialFieldType<BBoxStrategy> implements
if (!(booleanType instanceof BoolField)) {
throw new RuntimeException("Must be a BoolField: " + booleanType);
}
- if (!(numberType instanceof TrieDoubleField)) { // TODO support TrieField
(any trie) once BBoxStrategy does
- throw new RuntimeException("Must be TrieDoubleField: " + numberType);
+ if (numberType.getNumberType() != NumberType.DOUBLE) {
+ throw new RuntimeException("Must be Double number type: " + numberType);
+ }
+ if ( ! numberType.hasProperty(DOC_VALUES)) {
+ throw new RuntimeException("Must have doc values: " + numberType);
}
//note: this only works for explicit fields, not dynamic fields
@@ -138,7 +141,9 @@ public class BBoxField extends
AbstractSpatialFieldType<BBoxStrategy> implements
final SchemaField solrNumField = new SchemaField("_", numberType);//dummy
temp
org.apache.lucene.document.FieldType luceneType =
(org.apache.lucene.document.FieldType)
solrNumField.createField(0.0).fieldType();
+ luceneType = new org.apache.lucene.document.FieldType(luceneType);
luceneType.setStored(storeSubFields);
+ luceneType.freeze();
{noformat}
But several of the tests are failing for reasons I don't understand. I'm
attaching the log: [^tests-failures.txt].
[~dsmiley], could you take a look?
> BBoxField does not support point-based number sub-fields
> --------------------------------------------------------
>
> Key: SOLR-10891
> URL: https://issues.apache.org/jira/browse/SOLR-10891
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Steve Rowe
> Attachments: SOLR-10891.patch, tests-failures.txt
>
>
> I noticed while removing Trie fields from example schemas on SOLR-10760 that
> BBoxField uses Trie fields in at least one example schema.
> I went looking and there is theoretical machinery to support points, but when
> I added a point-based bbox variant to TestSolr4Spatial, I get test failures.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]