Github user merrimanr commented on the issue:

    https://github.com/apache/metron/pull/995
  
    To give an idea of how I arrived at the conclusion that other fields are 
not a problem, this is how I tested it.  I will use currency as an example.  
First I added this to our bro schema:
    ```
    <dynamicField name="*.c"   type="currency" indexed="true"  stored="true"/>
    <fieldType name="currency" class="solr.CurrencyField" precisionStep="8"
                 defaultCurrency="USD" currencyConfig="currency.xml" />
    ```
    I also added the currency.xml file from the example configs that ship with 
Solr.  Then I added that field to the integration test added in this PR 
(SolrUpdateIntegrationTest.suppress_expanded_fields).  It ends up looking like:
    ```
    @Test
      public void suppress_expanded_fields() throws Exception {
        dao = new MultiIndexDao(createDao());
        dao.init(accessConfig);
    
        Map<String, Object> fields = new HashMap<>();
        fields.put("guid", "bro_1");
        fields.put("source.type", SENSOR_NAME);
        fields.put("ip_src_port", 8010);
        fields.put("long_field", 10000);
        fields.put("latitude", 48.5839);
        fields.put("score", 10.0);
        fields.put("is_alert", true);
        fields.put("field.location_point", "48.5839,7.7455");
        fields.put("field.c", "1000,EUR");
    
        Document document = new Document(fields, "bro_1", SENSOR_NAME, 0L);
        dao.update(document, Optional.of(SENSOR_NAME));
    
        Document indexedDocument = dao.getLatest("bro_1", SENSOR_NAME);
    
        // assert no extra expanded fields are included
        Assert.assertEquals(9, indexedDocument.getDocument().size());
      }
    ```
    If we get the same number of fields back that we indexed originally, we 
know no extra fields are being returned.


---

Reply via email to