gutenbergtools / autocat3

CherryPy App that serves dynamic content for Project Gutenberg
GNU General Public License v3.0
2 stars 6 forks source link

Missing results in search #80

Closed gbnewby closed 3 years ago

gbnewby commented 3 years ago

I verified this report, which arrived in the Project Gutenberg inbox:

https://www.gutenberg.org/ebooks Quick Search for "Happened Otherwise" it finds the book "It Might Have Happened Otherwise".

then https://www.gutenberg.org/ebooks search and browse advanced search title = "Happened Otherwise" Search 0 results.

experimenting more: a single word in the title box "Spell" found 58 entries but not the book "Learning to Spell"

two words in the title box "to Spell" found 27 entries, none of them having the string "to Spell"

"Learning to Spell" in the title box: no results.

Quick Search "Learning to Spell" works.

eshellman commented 3 years ago

None of the recently posted books are visible in advanced search. AT ALL! I am suspicious of the permission changes made 2 weeks ago

eshellman commented 3 years ago

Problem dates back to books added April 22, so permission changes are unlikely to be the cause. Could not reproduce the problem with a restore from the prod database. Leading hypothesis - index corruption in the database.

We'll need to examine all the code that writes to the database. Won't be fun.

eshellman commented 3 years ago

The problem turned out to be the permissions on the .pgpass file. Recommended is 600, production was configured with 622. Some components are more lenient that others; apparently the SQLAlchemy connection Engine is stricter than what Autocat3 has been using for raw SQL.