apache / apache/lucene

Consolidate DW(PT)#updateDocument and #updateDocuments [LUCENE-9276]

Open
#10,316 1 comment 0 reactions 0 assignees View on GitHub
affects-version:8.5 affects-version:9.0 legacy-jira-priority:Major type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

While I was working on another IW related issue I made some changes to DW#updateDocument but forgot DW#updateDocuments which is annoying since the code is 99% identical. The same applies to DWPT#updateDocument[s]. IMO this is the wrong place to optimize in order to safe one or two object creations. Maybe we can remove this code duplication.

---
Migrated from [LUCENE-9276](https://issues.apache.org/jira/browse/LUCENE-9276) by Simon Willnauer (@s1monw), updated Mar 13 2020

Contributor guide

Open the contributing guide

Research direction

Start by locating DW#updateDocument, DW#updateDocuments, and the corresponding DWPT#updateDocument[s] entry points, then compare their implementations to identify the duplicated logic. The work is done when the duplication is consolidated without changing behavior and the relevant Lucene tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 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.