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

Feature/combine mapper filtersearch #2643

Merged
merged 13 commits into from
Aug 8, 2022

Conversation

thoniTUB
Copy link
Collaborator

@thoniTUB thoniTUB commented Aug 2, 2022

No description provided.

@thoniTUB thoniTUB requested a review from awildturtok August 2, 2022 16:10
@thoniTUB thoniTUB requested a review from awildturtok August 4, 2022 07:10
@thoniTUB thoniTUB marked this pull request as ready for review August 4, 2022 07:10
@@ -126,38 +125,28 @@ public void updateSearch() {
for (Searchable searchable : collectedSearchables) {

service.submit(() -> {
final Stream<FEValue> values = searchable.getSearchValues(getParserConfig(), storage);

Copy link
Collaborator

Choose a reason for hiding this comment

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

Mir ist gestern aufgefallen, dass sich der Job nicht canceln lässt, kannst du das heir in einen separaten Job heben und dann eine cancel methode implementieren? Es reicht ein shutdownNow zu machen in der join-loop und dann zu exiten wenn der rest durchgelaufen ist (vlt auch ein clear?) das hätte mir gestern einiges an zeit gespart :D

Copy link
Collaborator

Choose a reason for hiding this comment

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

Der Kommentar ließ sich leider nicht weiter oben machen, ich meine für Zeile 92/93

// We inject the service as a non-final property so, jackson will never try to create a serializer for it (in contrast to constructor injection)
@JsonIgnore
@JacksonInject(useInput = OptBoolean.FALSE)
@NonNull
Copy link
Collaborator

Choose a reason for hiding this comment

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

NotNull oder NonNul?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

NonNull, auf einem Shard darf es null sein, es sollte aber nie explizit auf null gesetzt werden.


import java.util.Map;

public interface Index<T extends IndexKey<? extends Index<T>>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

bisschen komisch, dass ein Index nur put hat?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Es hatte erst auch ein get, aber das brauchte ich letztendlich nicht

}
}
catch (IOException ioException) {
log.warn("Failed to open {}", key.getCsv(), ioException);
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
log.warn("Failed to open {}", key.getCsv(), ioException);
log.warn("Failed to open `{}`", key.getCsv(), ioException);

Damit man sehen kann, ob es evtl Whitespace Error sind :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ich benutze jetzt
String externalValueCleaned = CharMatcher.whitespace().trimAndCollapseFrom(externalValue, ' ');

final String externalValue = substitutor.replace(externalTemplate);

// Clean up the substitution by removing repeated white spaces
String externalValueCleaned = externalValue.replaceAll("\\s+", " ");
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 das Regex schon woanders erzeugen? So wird das im HotLoop erzeugt

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ich benutze jetzt
String externalValueCleaned = CharMatcher.whitespace().trimAndCollapseFrom(externalValue, ' ');


@Slf4j
@Data
public class FilterSearch {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Warum ist sie jetzt in query?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nach api passt sie nicht so wirklich, nach dw müsste sie eigentlich in ein core package

Comment on lines 8 to 13
public class MatcherTest {
@Test
void test() {

log.info("result {}", CharMatcher.whitespace().trimAndCollapseFrom("hekd dskf d dkfjdk", ' '));
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

💣

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

upps mache ich noch wieder raus

thoniTUB and others added 3 commits August 5, 2022 17:53
# Conflicts:
#	backend/src/test/resources/tests/endpoints/adminEndpointInfo.json
#	docs/Table JSONs.md
@thoniTUB thoniTUB merged commit e854769 into develop Aug 8, 2022
@delete-merged-branch delete-merged-branch bot deleted the feature/combine-mapper-filtersearch branch August 8, 2022 07:13
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