MaRDI4NFDI / portal-compose

docker-composer repo for mardi
https://portal.mardi4nfdi.de
GNU General Public License v3.0
3 stars 1 forks source link

Understand why haswbstatement:* search does not work #432

Open physikerwelt opened 7 months ago

physikerwelt commented 7 months ago

Describe the issue https://portal.mardi4nfdi.de/w/index.php?search=haswbstatement%3A*&title=Special%3ASearch&profile=advanced&fulltext=1&ns0=1&ns120=1&ns122=1&ns4200=1&ns4202=1 does not provide any results. However, one would expect that it returns almost all wikibase items.

eloiferrer commented 3 months ago

I've found (https://phabricator.wikimedia.org/T192288) that we just have to specify the properties that we want to index using:

$wgWBRepoSettings['searchIndexProperties'] = [ 'P999', 'P888' ];

I've checked it locally and it works. The only question is, do we want to index all properties? Or should we just do this for some relevant subset?

physikerwelt commented 3 months ago

I've found (https://phabricator.wikimedia.org/T192288) that we just have to specify the properties that we want to index using:

$wgWBRepoSettings['searchIndexProperties'] = [ 'P999', 'P888' ];

I've checked it locally and it works. The only question is, do we want to index all properties? Or should we just do this for some relevant subset?

We confirmed by local testing that adding

$wgWBRepoSettings['searchIndexProperties'] = [ 'P999', 'P888' ];

resolves the issue. I suggest starting with a few properties to see how well this works in production.

Maybe start with P1451 an extend it a second step.

physikerwelt commented 3 months ago

This is now deployed

physikerwelt commented 3 months ago

Working example search by de 2559697

https://portal.mardi4nfdi.de/w/index.php?search=haswbstatement%3AP1451%3D2559697&title=Special%3ASearch&profile=advanced&fulltext=1&ns120=1

physikerwelt commented 3 months ago

Force reindexing now


root@91e78119efac:/var/www/html/extensions/CirrusSearch/maintenance# php ForceSearchIndex.php --namespace 120 --queue
...
[             my_wiki] Queued 100 pages ending at 67235 at 431/second
physikerwelt commented 3 months ago

reindexing has finished.