Skip to content

solr search backend #3683

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

Open
wants to merge 60 commits into
base: develop
Choose a base branch
from
Open

solr search backend #3683

wants to merge 60 commits into from

Conversation

thoniTUB
Copy link
Collaborator

@thoniTUB thoniTUB commented Mar 3, 2025

No description provided.

@thoniTUB thoniTUB requested a review from awildturtok as a code owner March 4, 2025 08:26
@thoniTUB thoniTUB requested a review from awildturtok June 23, 2025 06:48
Comment on lines 54 to 66
public TrieSearch<FrontendValue> createSearch(Searchable searchable) {
if (searchable instanceof FilterTemplate temp) {

return getFilterTemplateSearch(temp);
}

if (searchable instanceof LabelMap labelMap) {
return getLabelMapSearch(labelMap);
}

return new TrieSearch<>(searchable.isGenerateSuffixes() ? getNgramLength() : Integer.MAX_VALUE, getSearchSplitChars());

}
Copy link
Collaborator

Choose a reason for hiding this comment

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

kannst du Searchable sealen und das dann über ein switch lösen? Das würde hier klarer machen, was das else ist.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Dann müssen alle Searchables in einem package liegen, das ist auch unschön 🤔

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also ich glaube nicht, dass du es sealen musst um switch zu bekommen. Im gleichen Package wäre tatsächlich sehr schlecht für uns.

@thoniTUB thoniTUB requested a review from Kadrian as a code owner July 2, 2025 19:28
@awildturtok awildturtok self-requested a review July 7, 2025 06:55
Copy link
Collaborator

@awildturtok awildturtok left a comment

Choose a reason for hiding this comment

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

Habe noch ein paar große Klassen vor mir

* If you have a complex expression, consider to surround your template with parentheses, so the concatenating "AND"s apply to the whole template.
*/
@NotEmpty
private String queryTemplate = "( ${term} value_s:\"${term}\"^100 )";
Copy link
Collaborator

Choose a reason for hiding this comment

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

danke, deutlich lesbarer!

builder.withBasicAuthCredentials(username, password);
}

return builder.build();
Copy link
Collaborator

Choose a reason for hiding this comment

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

hier hast du keinen ConcurrentClient verwendet, ist das absicht?

@@ -117,14 +117,22 @@ public abstract class ManagedExecution extends MetaIdentifiable<ManagedExecution
@Getter
@JsonIgnore
@EqualsAndHashCode.Exclude
@ToString.Exclude
Copy link
Collaborator

Choose a reason for hiding this comment

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

=> onlyExplicitlyIncluded?

/**
* Buffer docs to send larger update chunks (size {@link FilterValueIndexer#updateChunkSize}).
*/
private final LinkedList<SolrFrontendValue> openDocs = new LinkedList<>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
private final LinkedList<SolrFrontendValue> openDocs = new LinkedList<>();
private final Queue<SolrFrontendValue> openDocs = new LinkedList<>();


@Override
public List<FrontendValue> findExact(String searchTerm, int maxValue) {
throw new UnsupportedOperationException("Must not be used. Use " + FilterValueSearch.class);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Warum keine delegation?


@Override
public Iterator<FrontendValue> iterator() {
throw new UnsupportedOperationException("Must not be used. Use " + FilterValueSearch.class);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wo wird der verwendet?

Comment on lines +129 to +132
while (openDocs.size() >= updateChunkSize) {
log.trace("Adding {} documents for {}", openDocs.size(), searchable);
registerValues(openDocs);
openDocs.clear();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ich sehe nicht wo du hier chunking machst

.filter(Predicate.not(String::isBlank))
// Escape
.map(ClientUtils::escapeQueryChars)
//
Copy link
Collaborator

Choose a reason for hiding this comment

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

// ?

:D

@thoniTUB thoniTUB force-pushed the feature/solr-search branch from 64bf39f to 073a208 Compare July 11, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants