Skip to content

fix: reimplements firstExact match in legacy search.#3864

Draft
awildturtok wants to merge 3 commits intodevelopfrom
feature/prioritised-search-exact
Draft

fix: reimplements firstExact match in legacy search.#3864
awildturtok wants to merge 3 commits intodevelopfrom
feature/prioritised-search-exact

Conversation

@awildturtok
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@thoniTUB thoniTUB left a comment

Choose a reason for hiding this comment

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

Habe die bei solr noch hinzugefügt, dass die Ergebnisse nach sourcePriority sortiert werden.

Der neue Methodenname kann denke ich jetzt wieder raus, weil wir die fehlerhafte Methode nicht nutzen.

Kann ansonten gemergt werden, wenn das bereinigt ist

Comment on lines 295 to 316
@Override
public ConceptsProcessor.ExactFilterValueResult findExact(SelectFilter<?> filter, List<String> searchTerms) {
final List<FrontendValue> out = new ArrayList<>();
// search in the full text engine
final Set<String> openSearchTerms = new HashSet<>(searchTerms);


for (final Iterator<String> iterator = openSearchTerms.iterator(); iterator.hasNext(); ) {

final String searchTerm = iterator.next();
final List<FrontendValue> results = findExact(filter, searchTerm);

if (results.isEmpty()) {
continue;
}

iterator.remove();
out.addAll(results);
}

return new ConceptsProcessor.ExactFilterValueResult(out, openSearchTerms);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Du kannst die Methode einfach wegwerfen, wir brauchen nicht für einen Wert nicht mehrere Ergebnisse

Comment on lines +372 to +376
@Override
public ConceptsProcessor.ExactFilterValueResult findFirstExact(SelectFilter<?> filter, List<String> searchTerms) {
throw new NotImplementedException(); //TODO
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Kann dann auch wieder weg

Comment on lines +89 to +98
/**
* Query for an exact matching {@link FrontendValue}, per search term return only the first match by priority of search sources.
*
* Matches {@link FrontendValue#getValue()} or {@link FrontendValue#getLabel()} but case-insensitive.
* @param filter The filter to the resulting value must correspond to (domain of the {@link FrontendValue})
* @param searchTerms The exact terms to match
* @return A container with the exact matches and unmatched values.
*/
ConceptsProcessor.ExactFilterValueResult findFirstExact(SelectFilter<?> filter, List<String> searchTerms);

Copy link
Collaborator

Choose a reason for hiding this comment

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

Auch weg

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.

2 participants