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

    https://github.com/apache/metron/pull/662#discussion_r129147257
  
    --- Diff: 
metron-platform/metron-indexing/src/main/java/org/apache/metron/indexing/dao/search/FieldType.java
 ---
    @@ -0,0 +1,52 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.metron.indexing.dao.search;
    +
    +import com.fasterxml.jackson.annotation.JsonProperty;
    +
    +public enum FieldType {
    +  @JsonProperty("string")
    +  STRING("string"),
    +  @JsonProperty("ip")
    +  IP("ip"),
    +  @JsonProperty("integer")
    +  INTEGER("integer"),
    +  @JsonProperty("long")
    +  LONG("long"),
    +  @JsonProperty("date")
    +  DATE("date"),
    +  @JsonProperty("float")
    +  FLOAT("float"),
    +  @JsonProperty("double")
    +  DOUBLE("double"),
    +  @JsonProperty("boolean")
    +  BOOLEAN("boolean"),
    +  @JsonProperty("other")
    --- End diff --
    
    "other" just means it's not one of the other simple types in the enum.  The 
Elasticsearch Java API returns the search result as a Map<String, Object> type 
which is also the return type of the controller so it's up to Jackson to 
serialize it.  We are not doing anything special to map values to types when 
returning search results.  So far I haven't seen Jackson have any problems with 
the types being returned.  From what I can tell Elasticsearch mostly sticks to 
simple types for the values.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to