I am trying to implement full text search using postgresql for some images. I am storing some information about my images into a json field in my table. This json has a tags
key where I have multiple languages, each one with tags (keywords), something like this:
"tags": {
"en": ["blue female", "red female"],
"es": ["hembra azul", "hembra roja"]
}
At this moment I don't have a clear idea how to store the tsvector
considering that I have more languages.
One initial idea was to concatenate all those tsvectors
into a single one and store it on a column in my table.
The second idea would be to make a different column for each language and store the corespondent vector into that column.
Which on would be the better one? There is maybe another better approach?