internetarchive / internetarchive/openlibrary

Subsequent edits to same work not stored in solr in dev environment

Open
#1,057 4 comments 0 reactions 0 assignees View on GitHub
Lead: @cdrini Module: Solr Needs: Investigation Priority: 3 Theme: Search Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 14h
Merged PRs (30d)
126

Description

To reproduce:

1. Launch a dev environment of openlibrary (tested both vagrant and docker)
2. Edit a work's title to include the word "foo"; save it.
3. Search for "foo"; the modified work appears
4. Edit the same work's title to include the word "bars"; save it.
5. Search for "bars"

Expected: the modified work appears
Actual: No matches

This continues to happen even if I:
a) edit the work again
b) wait 15 minutes
c) "force" an update at http://localhost:8080/admin/solr

A similar phenomenon happens when editing editions, however since solr only stores works, editing an edition behaves the same as editing its work directly (i.e. the _work_ no longer updates in solr on subsequent edits).

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction steps in a local dev environment and inspect the admin/solr endpoint involved in forcing updates. Compare indexing behavior after the first and subsequent work or edition edits. Done means later title changes are stored and searchable, including after waiting or forcing an update.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.