-
Notifications
You must be signed in to change notification settings - Fork 13
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
base: develop
Are you sure you want to change the base?
solr search backend #3683
Conversation
backend/src/main/java/com/bakdata/conquery/models/config/search/SolrConfig.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/models/config/search/SolrConfig.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/models/config/search/InternalSearchConfig.java
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/models/config/search/SolrConfig.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/models/config/search/SolrConfig.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/util/search/solr/CombinedSolrSearch.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/util/search/solr/SolrProcessor.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/util/search/solr/SolrSearch.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/util/search/solr/SolrSearch.java
Outdated
Show resolved
Hide resolved
backend/src/test/java/com/bakdata/conquery/integration/tests/FilterAutocompleteTest.java
Outdated
Show resolved
Hide resolved
…couple cluster chunk size from solr chunk size
backend/src/main/java/com/bakdata/conquery/apiv1/FilterTemplate.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/models/config/search/InternalSearchConfig.java
Show resolved
Hide resolved
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()); | ||
|
||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
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.
backend/src/main/java/com/bakdata/conquery/models/config/search/solr/FilterValueConfig.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/models/config/search/solr/FilterValueConfig.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/util/search/solr/FilterValueSearch.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/util/search/solr/FilterValueSearch.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/util/search/solr/SolrProcessor.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/com/bakdata/conquery/util/search/solr/SolrProcessor.java
Show resolved
Hide resolved
backend/src/test/java/com/bakdata/conquery/integration/tests/FilterAutocompleteTest.java
Show resolved
Hide resolved
There was a problem hiding this 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 )"; |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wo wird der verwendet?
while (openDocs.size() >= updateChunkSize) { | ||
log.trace("Adding {} documents for {}", openDocs.size(), searchable); | ||
registerValues(openDocs); | ||
openDocs.clear(); |
There was a problem hiding this comment.
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
backend/src/main/java/com/bakdata/conquery/util/search/solr/FilterValueIndexer.java
Show resolved
Hide resolved
.filter(Predicate.not(String::isBlank)) | ||
// Escape | ||
.map(ClientUtils::escapeQueryChars) | ||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ?
:D
64bf39f
to
073a208
Compare
No description provided.