How to scale input data when use logstash

Hi . Im newbie in elasticsearch and logstash. And I have some question . Please help me :slight_smile:

Im trying input data from postgres database into elasticsearch. I config and it running ok. But now i want scale data before input it into elasticsearch server.

Example : i have three field like this:
id....code....name
1.....10...........John
2......19.........Lina

i want scale data in field name . It look like John --> J o h n . Lina ---> L i n a
i want only field name scale like it when appear only in elasticsearch.
Thanks for your help :x :x

What do you mean by "scale"? Perhaps you can give an example of what you currently get (e.g. with a stdout { codec => rubydebug } output and show us what you want to get instead.

From what you write above it looks like you want to insert spaces between each letter in the name field, but that doesn't make sense.

1 Like

First thanks for your help.

yes,my expected is spaces between each letter in the name field. I want increase more term in elasticsearch. Because if only "John". it is only 1 term. But " J" "o" "h" "n" it like 4 term.

I want custom search in elasticsearch like my mind :slight_smile:

Logstash have anything can spaces between each letter in someone field i want ?

Thanks you very much

You can use a ruby filter to accomplish that, but I think you should solve this on the Elasticsearch side. It should be possible to define an analyzer that emits one term per letter.