Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change geoip.location type to geopoint #30

Closed
rkoster opened this issue May 20, 2015 · 2 comments
Closed

Change geoip.location type to geopoint #30

rkoster opened this issue May 20, 2015 · 2 comments

Comments

@rkoster
Copy link
Member

rkoster commented May 20, 2015

This way the Tile Map visualisation should work

@rkoster
Copy link
Member Author

rkoster commented May 21, 2015

I was able to get it to work with the following index template:

curl -XPUT http://localhost:9200/_template/logstash -d '
{
    "template": "logstash-*",
    "order": 10,
    "settings": {
        "number_of_shards": 4,
        "number_of_replicas": 1,
        "index": {
            "query": {
                "default_field": "@message"
            },
            "store": {
                "compress": {
                    "stored": true,
                    "tv": true
                }
            }
        }
    },
    "mappings": {
        "_default_": {
            "_all": {
                "enabled": false
            },
            "_source": {
                "compress": true
            },
            "_ttl": {
                "enabled": true,
                "default": "2592000000"
            },
            "dynamic_templates": [
                {
                    "string_template": {
                        "match": "*",
                        "mapping": {
                            "type": "string",
                            "index": "not_analyzed"
                        },
                        "match_mapping_type": "string"
                    }
                }
            ],
            "properties": {
                "@message": {
                    "type": "string",
                    "index": "analyzed"
                },
                "@tags": {
                    "type": "string",
                    "index": "not_analyzed"
                },
                "@timestamp": {
                    "type": "date",
                    "index": "not_analyzed"
                },
                "@type": {
                    "type": "string",
                    "index": "not_analyzed"
                },
                "message": {
                    "type": "string",
                    "index": "analyzed"
                },
                "message_data": {
                    "type": "object",
                    "properties": {
                        "Message": {
                            "type": "string",
                            "index": "analyzed"
                        }
                    }
                },
                "geoip": {
                    "properties": {
                        "location": {
                            "type": "geo_point"
                        }
                    }
                }
            }
        }
    }
}
'

Which is basically the same as this template with the addition of:

{
    "mappings": {
        "_default_": {
            "properties": {
                "geoip": {
                    "properties": {
                        "location": {
                            "type": "geo_point"
                        }
                    }
                }
           }
     }
}

@rkoster rkoster changed the title Chnage geoip.location type to geopoint Change geoip.location type to geopoint Jun 16, 2015
hannayurkevich added a commit to hannayurkevich/logsearch-for-cloudfoundry that referenced this issue Jul 26, 2016
@hannayurkevich
Copy link
Collaborator

Fixed in #147.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants