[ 
https://issues.apache.org/jira/browse/SOLR-7164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14337503#comment-14337503
 ] 

Ryan McKinley commented on SOLR-7164:
-------------------------------------

the test that would fail is include in the patch:
{code}
@Test
  public void testSpatialConfig() throws Exception {
    IndexSchema schema = h.getCoreInc().getLatestSchema();

    // BBox Config
    // Make sure the subfields are not stored
    SchemaField sub = schema.getField("bbox"+BBoxStrategy.SUFFIX_MINX);
    assertFalse(sub.stored());
    assertTrue(sub.indexed());
  }
{code}

The out of the box 'fix' is just to define a 'doubleType' and 'booleanType' 
that is indexed but not stored.  Totally possible, but easy to miss.  I'm just 
suggesting we make it hard to miss, explicitly say "i want the values stored 
also"

LatLonType & PointType use AbstractSubTypeFieldType... I don't fully understand 
that class, but I think it takes this into account.  it looks like the 
subfields are forced to:
{code}
Map<String, String> props = new HashMap<>();
    //Just set these, delegate everything else to the field type
    props.put("indexed", "true");
    props.put("stored", "false");
    props.put("multiValued", "false");
    int p = SchemaField.calcProps(name, type, props);
{code}


> BBoxFieldType should not store values for subfields (by default)
> ----------------------------------------------------------------
>
>                 Key: SOLR-7164
>                 URL: https://issues.apache.org/jira/browse/SOLR-7164
>             Project: Solr
>          Issue Type: Improvement
>          Components: spatial
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>         Attachments: SOLR-7164-bbox-stored.patch
>
>
> When the bbox field creates the subfields, it uses the schema for 'double' 
> and 'boolean' types.  
> As is, we can specify these field types as indexed, not stored -- but that is 
> a bit trappy.
> Lets add a property to the field definition:
> {code}
>  storeSubFields="false"
> {code}
> and register the subfields appropriatly



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to