Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1741 : solr auto exec complete #2582

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

DuckflipXYZ
Copy link
Collaborator

@DuckflipXYZ DuckflipXYZ commented Jan 15, 2025

Not tested in remote

If #2581 is already merged, SorlServiceImpl.indexAllNoAuth() have to be replaced by this (done) :

@Async
    @Transactional
public void indexAllNoAuth() {
	List<ShanoirMetadata> documents = new ArrayList<>();
	Map<Long, List<String>> tags = new HashMap<>();
	ShanoirEvent event;

	try {
		event = new ShanoirEvent(
				ShanoirEventType.SOLR_INDEX_ALL_EVENT,
				null,
				0L,
				"Cleaning Solr index...",
				ShanoirEvent.IN_PROGRESS,
				0f);
		eventService.publishEvent(event);
		cleanOldIndex(event);
		fetchDatasToIndex(event, documents, tags);
		indexDatas(event, documents, tags);
	} catch (SolrServerException | IOException ignored) {
	}
}

# Conflicts:
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/solr/service/SolrServiceImpl.java

# Conflicts:
#	shanoir-ng-datasets/src/main/java/org/shanoir/ng/solr/service/SolrServiceImpl.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Solr] Initialize datasets in solr when starting shanoir
2 participants