Analyse stored data in the elastic cloud with analyzer "whitespace"

Hello,

I uploaded about 500 Keywords to the elastic cloud server. Each keyword can have a different amount of words from 1 up to 8. With each keyword I store the number of clicks as integer.

I want to use the whitespace analyzer to get the single words within a keyword.

Via Sense this request worked:

POST searchterm_index/_analyze
{
"analyzer": "whitespace",
"text": "this is my keyword"
}

The question is: How can I use the whitespace analyzer for the data which is already stored in the elastic search cloud (the 500 keywords)?

In the example above I have to send a text wich will be "whitespace" analyzed. An not optimal solution to solve my problem could be a request to the elastic search cloud to get all 500 keywords and then the script analyze the 500 keywords in a loop with the whitespace analyzer. This seems not the perfect solution and so I'm wondering whether there is a smarter way?

Best
Dominik

Hi Dominik,

I've bumped this to the Elasticsearch forum since the question deals mainly with ES itself.

I believe your only option there would be to reindex the data into an index with a new mapping that includes just the whitespace analyzer on whatever field you're trying to query.

Though could be folks in this forum know of other tricks or good references for you.

Ok, but how can I get all (re)indexed whitespaces data? Let's assume I have to keywords. Each of the keywords contains of 3 words. So I should have 6 words in the whitespace index. How can I get these 6 words with one query?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.