Giter VIP home page Giter VIP logo

Comments (3)

avleen avatar avleen commented on June 21, 2024

We solved this a different way internally, by using notation on the Elasticsearch mapping.
We have the following dynamic field mapping:

"dynamic_templates": [
    {
        "short_template" : {
            "match" : "s_*",
            "mapping" : { "type" : "short", "index" : "not_analyzed" }
        }
    },
    {
        "long_template" : {
            "match" : "l_*",
            "mapping" : { "type" : "long", "index" : "not_analyzed" }
        }
    },
    {
        "double_template" : {
            "match" : "d_*",
            "mapping" : { "type" : "double", "index" : "not_analyzed" }
        }
    },
    {
        "bool_template" : {
            "match" : "b_*",
            "mapping" : { "type" : "boolean", "index" : "not_analyzed" }
        }
    },
    {
        "string_template" : {
            "match" : "*",
            "mapping": { "type": "string", "index": "not_analyzed" },
            "match_mapping_type" : "string"
        }
    }
],

If a field name starts with l_, Elasticsearch maps it to a long.
If it starts with b_, it's a boolean.
It requires more work on the end user to make it happen, and will require people to rename their fields.
But it's performant and reliable.

from logstash-filter-grok.

jordansissel avatar jordansissel commented on June 21, 2024

@avleen +1 on your solution, at least for now.

I'm content to close this. We can revisit or continue the discussion any time later :)

from logstash-filter-grok.

q2dg avatar q2dg commented on June 21, 2024

What about "ip_*" notation for IPv4 fields?
Thanks!

from logstash-filter-grok.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.