Improve Analysis Factory configuration workflow [LUCENE-4256]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
With the Factorys now available for more general use, I'd like to look at ways to improve the configuration workflow. Currently it's a little disjoint and confusing, especially around using `inform(ResourceLoader)`.
What I think we should do is:
- Remove the need for `ResourceLoaderAware` and pass in the ResourceLoader in `init`, so it'd become `init(Map args, ResourceLoader loader)`
- Consider moving away from the generic args Map and using setters. This gives us better typing and could mitigate bugs due to using the wrong configure key. However it does force the consumer to invoke each setter.
- If we're going to stick with using the args Map, then move the Version parameter into `init` as well, rather than being a setter as I currently made it.
---
Migrated from [LUCENE-4256](https://issues.apache.org/jira/browse/LUCENE-4256) by Chris Male, updated Aug 02 2012
Attachments: [LUCENE-4256_incomplete.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-4256/LUCENE-4256_incomplete.patch), [LUCENE-4256-further.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-4256/LUCENE-4256-further.patch), [LUCENE-4256-version.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-4256/LUCENE-4256-version.patch)
Contributor guide
Research direction
Start by reviewing the Analysis Factory configuration workflow, especially ResourceLoaderAware, inform(ResourceLoader), init, the args Map, and the Version setter. Read the three linked LUCENE-4256 patches and the comment discussion to determine which API direction was agreed on. Done means a decided and implemented configuration design with corresponding validation or regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100