Github user cestella commented on a diff in the pull request:

    https://github.com/apache/metron/pull/995#discussion_r182472485
  
    --- Diff: 
metron-platform/metron-solr/src/main/java/org/apache/metron/solr/dao/SolrUpdateDao.java
 ---
    @@ -92,9 +93,17 @@ public void batchUpdate(Map<Document, Optional<String>> 
updates) throws IOExcept
         }
       }
     
    -  private SolrInputDocument toSolrInputDocument(Document document) {
    +  protected SolrInputDocument toSolrInputDocument(Document document) {
         SolrInputDocument solrInputDocument = new SolrInputDocument();
    -    document.getDocument().forEach(solrInputDocument::addField);
    +    document.getDocument().forEach((field, value) -> {
    +      if (!isLocationSubField(field)) {
    +        solrInputDocument.addField(field, value);
    +      }
    +    });
         return solrInputDocument;
       }
    +
    +  private boolean isLocationSubField(String field) {
    +    return field.endsWith(LOCATION_SUB_FIELD_SUFFIX);
    --- End diff --
    
    Is there really no better way to determine if a field is a location field 
than this?  Can we not get the type somewhere?


---

Reply via email to