I made trying to use translate filter with a yml file to add geo_point this is the yml file configuration JP.558-0045:[135.4949, 34.6134]
`
yet when I run the pipeline with this config
translate {
field => "GeoPostalEnrich" # The field to match
destination => "GeoLocation" # Destination field for the result
dictionary_path => "/path/to/file"
fallback => "Unknown" # What to return if no match is found
}
}
All I get in Unknown.
I know that there there is be matches . I made sure there case sensitive. i have gotten to translate filter to work with csv file for simple stuff, but cant seam to get yml or json files to work. is my formatting off? What should the correct formatting be to get a geo_point out of it? How do i fix the no match issue?
i think my file was missing the spacing
had JP.558-0045:[135.4949, 34.6134] instead of JP.558-0045: [135.4949, 34.6134]
and that why it was not matching. thanks
also what is the correct format for geo_points so that elastic index it a correctly? this just gives me a number field
if I split a file into 10 files. and had 10 translate filters that would take up the same amount of memory as just the one file with one translate filter?
The documentation mentions that the translate filter is internally tested with very large dictionaries of abou 100 k values, yours have 10 times more values than that.
One alternative may be to use the memcached filter to enrich your data, but this also can lead to some issues because of the latency added.
Probably it may work well if you use the memcached on the same machine as your logstash and connects to it using a unix socket, but only testing it to know for sure.
You need to provide more context of what you are trying to do and what is not working.
By 2 pipelines you mean 2 different logstash pipelines? Pipelines in logstash are independent from each other, if you are trying to update the same document in both of them it will not work by design as each pipeline will try to update the documents at is own time.
I am joining 2 separate databases using matching id fields. I was able to create an enrich policy/index/pipeline that matched postal codes to geo point so I could add geo location info to my index (for maps). both databases have some of the same info and some info that the other leaves out. this way I could see all the information about a specific id in 1 database instead of 2 to make data analysis easier. I also named the field with database_name_fieldname so that each field would be unique and the fields would not over lap or be overridden. i was under the assumption that
doc_as_upsert => true
inserted missing documents and that action => "update"
only updated field that match and did not erases the fields that did not match. This way though the quires are run at different times they are they are only updating the doc with fields that don't already exist. and leaving the ones that are already there. is this not correct? this seems to be the way it is currently working. so I am trying to find an efficient way to add the geo location data. is it even possible to create a runtime field that uses the postal code field to add the geo point for my enrich policy as an alternative?
With 2 databases you mean 2 indices in Elasticsearch? There are no databases in Elasticsearch, the data is stored in indices, so I'm assuming you are talking about indices.
Also, you mentioned 2 pipelines, but you didn't share any of the configurations, it is really hard to understand what you are trying to do and how without seeing the configuration.
If possible share the logic you are using in your pipelines.
When using doc_as_upsert => true and action => "update", in combination with a custom document_id, logstash will update a document if the document id used exists, if the document id does not exist, it will then create a new document with it.
Is that what you want to do?
Not sure, it is not clear what exactly you are trying to do, but runtime fields can be very expensive to run.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.