openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Re-Index does not affect search results in some cases

Open bitnapper opened this issue 1 year ago • 13 comments

Problem

I searched for bad imports with &ouml, &auml and so on and corrected or merged them. Most of them are just fiexed. In some cases, the still appear in search even thouth that particular string is not contained anymore in the name alter alternative names:

Image

To reproduce do author search with the string '&ouml'. Theses following four should appear in the search even though they do not contain that particular string. I tried reindexing them weeks ago but still no change:

  1. OL13003741A
  2. OL9048686A
  3. OL13144316A
  4. OL13123872A

Reproducing the bug

  1. Author search for string '&ouml'.
  2. The above mentioned should appear in the search even though they do not contain that particular string.

Context

  • Browser (Chrome, Safari, Firefox, etc): firefox (should not be relevant)
  • OS (Windows, Mac, etc): macOS (should not be relevant)
  • Logged in (Y/N): y (should not be relevant)
  • Environment (prod, dev, local): prod (should not be relevant)

Breakdown

No response

bitnapper avatar Mar 01 '25 09:03 bitnapper

Hello @cdrini and @mekarpeles, can I try this problem?

harsha-0907 avatar Mar 04 '25 15:03 harsha-0907

My first finding is that the authors that have letter O with ':' (a german word) on top are facing this issue. From my understanding the German alphabets are causing the trouble.

harsha-0907 avatar Mar 04 '25 16:03 harsha-0907

Thank you @harsha-0907 . Can you give a breakdown of how you would try to breakdown/tackle this issue?

cdrini avatar Mar 10 '25 18:03 cdrini

@cdrini , I am working on it. Will update as soon as I find any fix. I retraced the path in reindexing in the sever side script but couldn't find any bugs. Will be looking into it. I will update you by 16th March

harsha-0907 avatar Mar 12 '25 16:03 harsha-0907

Hi @cdrini and @bitnapper, After inspecting the frontend HTML, I notice that ö is correct in HTML but incorrect when displaying on the web. This suggests a possible issue with data storage or retrieval. The database may still contain the encoded HTML entity (ö) instead of the correct character (ö). We could check the database directly and manually correct these entries using the proper German alphabet. However, this issue could also be related to the search index not updating properly, potentially due to caching or an indexing failure. As I am new to open-source contribution, could you provide guidance on:

  1. How the search index is structured (including relevant file paths)?
  2. How I can access the database to verify the stored values?

I appreciate your time and assistance, and I apologize for any inconvenience I have caused. Looking forward to your guidance. Thank you so much for your consideration!

BearSunny avatar Mar 20 '25 10:03 BearSunny

Hi, thank you @BearSunny ! Have you been able to get the local environment set up? That will give you a local copy of the database and of our search engine, solr, where you can experiment with making changes. Let us know if you hit any issues!

cdrini avatar Mar 24 '25 15:03 cdrini

Thank you so much for your response @cdrini. When I run "docker compose up", I hit this error: infobase-1 | exec docker/ol-infobase-start.sh: no such file or directory. This prevents me from running Open Library in my local development server. However, I have successfully forked and built Open Library (via "docker compose build"). What should I do from here? And in which file can I experiment with changing these search indices? Looking forward to hearing from you!

BearSunny avatar Mar 25 '25 04:03 BearSunny

Image

BearSunny avatar Mar 25 '25 04:03 BearSunny

That output looks correct; does the site come up at http://localhost:8080 ?

cdrini avatar Mar 25 '25 05:03 cdrini

Ah this will cause an error though exec docker/ol-infobase-start.sh: no such file or directory . Are you on our slack? Send me an email and I'll add you if not.

cdrini avatar Mar 25 '25 05:03 cdrini

I still get the error: "localhost refused to connect". And yes I am on Slack via CFP for Google Summer of Code 2025. I assume it is the result of these outputs: solr-updater-1 | exec docker/ol-solr-updater-start.sh: no such file or directory covers-1 | exec docker/ol-covers-start.sh: no such file or directory home-1 | exec docker/ol-home-start.sh: no such file or directory infobase-1 | exec docker/ol-infobase-start.sh: no such file or directory solr-updater-1 exited with code 1 home-1 exited with code 1 covers-1 exited with code 1 infobase-1 exited with code 1 web-1 | exec docker/ol-web-start.sh: no such file or directory I'm terribly sorry for bothering you with this setup.

BearSunny avatar Mar 25 '25 07:03 BearSunny

Update: After trying to fix with "Fix line endings, symlinks and git submodules (only for Windows users not using a Linux VM)", I have run up against another issue regarding infogami.

Image

BearSunny avatar Mar 25 '25 07:03 BearSunny

Hi @BearSunny , if you haven't already, can you post the error you're hitting in slack? There are more folks there who might be able to help :+1:

Something looks incorrect with your setup ; all the files in green on the left suggest that something is incorrect in the way git was setup. I would recommend deleting the entire openlibrary directory and following the instructions in https://github.com/internetarchive/openlibrary/blob/master/docker/README.md again, making sure to follow the windows instructions. Doing those at a later time can cause the repo to get in a weird state. That is my guess as to what happened here.

cdrini avatar Apr 07 '25 16:04 cdrini