etianen / django-watson

Full-text multi-table search application for Django. Easy to install and use, with good performance.
BSD 3-Clause "New" or "Revised" License
1.2k stars 130 forks source link

How to approach multilanguage issues? #213

Closed ebsaral closed 7 years ago

ebsaral commented 7 years ago

Note: I have seen other issues as well.

Right now, our backend is RegexSearchBackend even though we are using PostgreSQL (I don't know why). And we are using the watson like this:

search_query_encoded = unicode(search_query).encode('unicode_escape')
result_items = watson.filter(queryset, search_query_encoded)

This returns an empty result with some Japanese character included.

Right now, our platform supports different languages at the same time such as English, Japanese and French. Even if I switch to PostgreSQLSearchBackend, I still don't see the possibility to search text for different languages since it requires me to set a certain language like search_config = "pg_catalog.english"

Isn't there anything to support unicode search or something like that? (excuse my low knowledge on this topic)

What should be my approach? Can I achieve this with Watson?

ebsaral commented 7 years ago

After I switched to PostgreSQL, the issue is solved. I am able to search Japanese chars.