Skip to content

fix(search): remove stale facet metadata - #3682

Open
dschmidt wants to merge 1 commit into
mainfrom
fix/search-stale-facet-metadata
Open

dschmidt wants to merge 1 commit into
mainfrom
fix/search-stale-facet-metadata

Conversation

@dschmidt

@dschmidt dschmidt commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #3677.
The indexer already stats the resource, so it can compare the stored libre.graph.<facet>.* keys with the fresh extraction.

 doUpsertItem
   stat, extract, index
+  UnsetArbitraryMetadata(stored facet keys the extraction no longer delivers)
+  drop facet keys whose stored value is unchanged
   if no facet metadata: return
   SetArbitraryMetadata(facet keys)

Reindexing an unchanged file no longer writes to the storage. Existing leftovers disappear on the next reindex of the file.

@codacy-production

codacy-production Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 19 complexity

Metric Results
Complexity 19

View in Codacy

🟢 Coverage 82.14% diff coverage · +0.05% coverage variation

Metric Results
Coverage variation ✅ +0.05% coverage variation (-1.00%)
Diff coverage ✅ 82.14% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (371e84b) 91169 22413 24.58%
Head commit (d924ea1) 91197 (+28) 22468 (+55) 24.64% (+0.05%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#3682) 28 23 82.14%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@dschmidt
dschmidt force-pushed the fix/search-stale-facet-metadata branch 2 times, most recently from 6706b63 to d924ea1 Compare October 9, 2026 08:21
@dschmidt dschmidt changed the title fix(search): remove stale facet metadata and write only changed keys fix(search): remove stale facet metadata Oct 9, 2026
@dschmidt
dschmidt marked this pull request as ready for review October 9, 2026 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

search: indexing never removes facet metadata it no longer extracts

1 participant