Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

search by key does not work correctly #4973

Closed
gomin1d opened this issue Dec 4, 2020 · 4 comments
Closed

search by key does not work correctly #4973

gomin1d opened this issue Dec 4, 2020 · 4 comments
Labels
question This is more a question for the support than an issue.

Comments

@gomin1d
Copy link

gomin1d commented Dec 4, 2020

system debian 9, output of command weblate list_versions:

 * Weblate: 4.3.2
 * Django: 3.1.3
 * siphashc: 2.1
 * Whoosh: 2.7.4
 * translate-toolkit: 3.2.0
 * lxml: 4.6.1
 * Pillow: 8.0.1
 * bleach: 3.2.1
 * python-dateutil: 2.8.1
 * social-auth-core: 3.3.3
 * social-auth-app-django: 4.0.0
 * django-crispy-forms: 1.9.2
 * oauthlib: 3.1.0
 * django-compressor: 2.4
 * djangorestframework: 3.12.2
 * django-filter: 2.4.0
 * django-appconf: 1.0.4
 * user-agents: 2.2.0
 * filelock: 3.0.12
 * setuptools: 50.3.2
 * jellyfish: 0.8.2
 * openpyxl: 3.0.5
 * celery: 4.4.7
 * kombu: 4.6.11
 * translation-finder: 2.5
 * weblate-language-data: 2020.12
 * html2text: 2020.1.16
 * pycairo: 1.20.0
 * pygobject: 3.38.0
 * diff-match-patch: 20200713
 * requests: 2.24.0
 * django-redis: 4.12.1
 * hiredis: 1.1.0
 * sentry_sdk: 0.19.4
 * Cython: 0.29.21
 * misaka: 2.1.1
 * GitPython: 3.1.11
 * borgbackup: 1.1.14
 * pyparsing: 2.4.7
 * Python: 3.6.10
 * Git: 2.17.0
 * chardet: 3.0.4
 * ruamel.yaml: 0.16.12
 * mysqlclient: 2.0.1
 * Redis server: 3.2.6
 * MariaDB sever: 10.1.47
 * Database backends: django.db.backends.mysql
 * Cache backends: default:RedisCache, avatar:FileBasedCache
 * Email setup: django.core.mail.backends.smtp.EmailBackend: postfix.mineland.net
 * OS encoding: filesystem=utf-8, default=utf-8
 * Celery: redis://:%5B7UoPbwRh1%7D7t5%5Ep%2B%25y%5DIw0X%29jPUxnXvZ%3B%5BjMY%2Ap@localhost:6379, redis://:%5B7UoPbwRh1%7D7t5%5Ep%2B%25y%5DIw0X%29jPUxnXvZ%3B%5BjMY%2Ap@localhost:6379, regular
 * Platform: Linux 4.9.0-14-amd64 (x86_64)

i have weblate installed on my host https://weblate.mineland.net/

there is a string feed with the buildbattle.theme.doll key: https://weblate.mineland.net/translate/mineland/mineland/en/?checksum=458259caf6af3bb6

however, if you try to find this string by key buildbattle.theme.doll, then the search will find another key: https://weblate.mineland.net/translate/mineland/mineland/en/?offset=1&q=buildbattle.theme.doll&sort_by=-priority%2Cposition&checksum=

if you use the prefix key:buildbattle.theme.doll in the search, then nothing changes: https://weblate.mineland.net/translate/mineland/mineland/en/?offset=1&q=key%3Abuildbattle.theme.doll&sort_by=-priority%2Cposition&checksum=

image

both methods do not search correctly by key key:buildbattle.theme.doll

on the other hand, some of the keys are searched correctly, for example, the нет_прав key is searched correctly: https://weblate.mineland.net/translate/mineland/mineland/en/?offset=1&q=%D0%BD%D0%B5%D1%82_%D0%BF%D1%80%D0%B0%D0%B2&sort_by=-priority%2Cposition&checksum=

image

@nijel
Copy link
Member

nijel commented Dec 4, 2020

What works better is using exact match: key:="buildbattle.theme.doll" (see https://docs.weblate.org/en/latest/user/search.html). Without that the matching relies on MySQL fulltext which seems to produce undesired matches here. The similar issues are one of the reasons why we recommend using PostgreSQL, see https://docs.weblate.org/en/latest/admin/install.html#database-setup

@nijel nijel added the question This is more a question for the support than an issue. label Dec 4, 2020
@github-actions
Copy link

github-actions bot commented Dec 4, 2020

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you!

@gomin1d
Copy link
Author

gomin1d commented Dec 4, 2020

thanks

@gomin1d gomin1d closed this as completed Dec 4, 2020
@github-actions
Copy link

github-actions bot commented Dec 4, 2020

The issue you have reported is resolved now. If you don’t feel it’s right, please follow it’s labels to get a clue and take further steps.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

2 participants