Skip to content

Text to vector refactoring#4375

Draft
nicolo-rinaldi wants to merge 9 commits intoapache:mainfrom
SeaseLtd:text-to-vector-refactoring
Draft

Text to vector refactoring#4375
nicolo-rinaldi wants to merge 9 commits intoapache:mainfrom
SeaseLtd:text-to-vector-refactoring

Conversation

@nicolo-rinaldi
Copy link
Copy Markdown
Contributor

Description

This refactoring is needed to prepare the code for the addition of the new module "Document Enrichment with LLMs" already in PR #4229, to avoid duplicated code as much as possible.

Solution

Abstract classes have been created for both the model and the store/rest packages. Also, renamed the exception to generalize across models. Implemented actual instances of the new abstract classes for the Text-to-vector module.
Claude code has been used as an assistant for coding this PR.

Tests

No tests have been added, since only interfaces and abstract classes have been developed.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

@github-actions github-actions Bot added the tests label Apr 28, 2026
@ThreadSafe
public abstract class ManagedModelStore<M extends SolrLanguageModel> extends ManagedResource
implements ManagedResource.ChildResourceSupport {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kept it here due to the fact that most of the logic is in the function that are already in the abstract class

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.

2 participants