Skip to content

Search by label does not work in the example environment #233

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

Closed
tonyKunchev opened this issue Nov 19, 2021 · 6 comments
Closed

Search by label does not work in the example environment #233

tonyKunchev opened this issue Nov 19, 2021 · 6 comments

Comments

@tonyKunchev
Copy link

Hello, I am using the docker configurations provided in the /example directory without any changes.
At first glance everything looks good and all of the services are running correctly (based on my understanding of the environment). I was able to create few Items and Properties via the Special Pages, but when I search for them by their label, they don't appear and the search returns no results. However, if I search for their ID for example Q1, they are returned.

Is there an additional configuration or service that is missing from the example that I need to set in order for the search to work with labels too?

@toban
Copy link
Contributor

toban commented Nov 19, 2021

Hey @tonyKunchev

I just tried this out on and it seems to work for me. Did you do any special configuration apart from

  1. copy the template.env -> .env
  2. docker-compose up

To further debug this you can also use the browser console to see the requests going to the search endpoint

They look something like this

http://localhost/w/api.php?action=wbsearchentities&search=test&format=json&errorformat=plaintext&language=en&uselang=en&type=item

If you could share the result of that it would help alot.

@toban
Copy link
Contributor

toban commented Nov 19, 2021

Another thing to keep in mind is that the language you entered the labels in might differ from the one that the search request is using. Please make sure that the language you are using in the UI is the same language of the label you entered.

@atomotic
Copy link

atomotic commented Nov 19, 2021

same behaviour for me.
the property has English label, api.php is called with argument &language=en&uselang=en

wikibase

@tonyKunchev
Copy link
Author

Hey @toban

I failed to mention that I am using the extra compose as well. The only thing that I did is to rename the template.env to just .env and set actual passwords for the MW_ADMIN_PASS, MW_SECRET_KEY and DB_PASS.

The docker command that I am using is:

docker-compose -f docker-compose.yml -f docker-compose.extra.yml up

which brings up the following services:

CONTAINER ID   IMAGE                                    COMMAND                   CREATED         STATUS         PORTS                                   NAMES
cab71ad153f7   wikibase/quickstatements:wmde.1          "/bin/bash /entrypoi…"    7 minutes ago   Up 7 minutes   0.0.0.0:8840->80/tcp, :::8840->80/tcp   example_quickstatements_1
7ce8d78d43fa   wikibase/wdqs:0.3.40-wmde.1              "/entrypoint.sh /run…"    7 minutes ago   Up 7 minutes                                           example_wdqs-updater_1
2962234b586c   wikibase/wikibase-bundle:1.35.2-wmde.1   "/bin/bash /jobrunne…"    7 minutes ago   Up 7 minutes   80/tcp                                  example_wikibase_jobrunner_1
d50c4d5b7015   wikibase/wikibase-bundle:1.35.2-wmde.1   "/bin/bash /entrypoi…"    7 minutes ago   Up 7 minutes   0.0.0.0:80->80/tcp, :::80->80/tcp       example_wikibase_1
60c34a05ab57   wikibase/wdqs-frontend:wmde.1            "/entrypoint.sh ngin…"    7 minutes ago   Up 7 minutes   0.0.0.0:8834->80/tcp, :::8834->80/tcp   example_wdqs-frontend_1
b97908b93911   wikibase/wdqs-proxy:wmde.1               "/bin/sh -c \"/entryp…"   7 minutes ago   Up 7 minutes   80/tcp                                  example_wdqs-proxy_1
1d113c54667f   wikibase/wdqs:0.3.40-wmde.1              "/entrypoint.sh /run…"    7 minutes ago   Up 7 minutes   9999/tcp                                example_wdqs_1
6ff6a4761d4a   wikibase/elasticsearch:6.5.4-wmde.1      "/usr/local/bin/dock…"    7 minutes ago   Up 7 minutes   9200/tcp, 9300/tcp                      example_elasticsearch_1
60fdaa9ecba4   mariadb:10.3                             "docker-entrypoint.s…"    7 minutes ago   Up 7 minutes   3306/tcp                                example_mysql_1

Here are 2 screenshots, the first is search by the label and the second by ID:
no-search-result
search-with-result

Additionally, you are correct that the with the base compose file the search is working properly as I've just tested it. So the issue have to be related to the staff that the extra one brings. Initially I thought that it should be the proxy, but I think the proxy is used only for the example_wdqs-frontend_1 service and it has not thing to do with the Wiki UI. Furthermore, it is working for the ID so it shouldn't be the proxy.

I am not sure where to look as there is no clear indication in the logs that something is wrong or that some request fails due error or something.

@toban
Copy link
Contributor

toban commented Nov 23, 2021

Hello @tonyKunchev,

I finally got around to looking into this again. And yes it seems you are right about the following.

The wmde.1 release currently is not working properly with the example/ on main. The documentation on mediawiki.org has been pointing to the main of this repository which has some "improvements" that seems to break elasticsearch (in particular the job runner).

I've added a new tag that points to a known good version of the example https://github.com/wmde/wikibase-release-pipeline/tree/wmde.1/example that you can try using instead.

I've also added a new ticket to track the issue with the latest example in https://phabricator.wikimedia.org/T296307, we should get that fixed before the new release is done.

@toban
Copy link
Contributor

toban commented Nov 23, 2021

Hey,

I had a closer look and it seems to be some missing env vars in the example

If you wanna try out a working example here is a pr #241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants