Skip to content

Conversation

@lrosenstrom
Copy link
Contributor

Maybe we can try this out on dev2 to see how it works in practice.

@lrosenstrom lrosenstrom requested review from kwahlin and olovy December 18, 2024 15:17
@lrosenstrom
Copy link
Contributor Author

This might be a too naive approach to how this should work? Hopefully it can be a start...

Copy link
Contributor

@kwahlin kwahlin left a comment

Choose a reason for hiding this comment

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

See comments, otherwise LGTM! Let's try it out on e.g. dev2.

SearchUtils2(Whelk whelk) {
this.queryUtil = new QueryUtil(whelk);
this.disambiguate = new Disambiguate(whelk);
this.jsonLd = whelk.getJsonld();
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to pass on the JsonLd object, use Disambiguate.isSubclassOf() instead.

var sliceNode = new LinkedHashMap<>();
var isRange = rangeProps.contains(property);
var observations = getObservations(buckets, isRange ? queryTree.removeTopLevelPropValueWithRangeIfPropEquals(property) : queryTree, nonQueryParams);
if (property.name().equals(Disambiguate.RDF_TYPE)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Use property.isType() to catch both work and instance types (hasInstanceType/instanceOfType in addition to rdf:type).

@lrosenstrom lrosenstrom force-pushed the feature/lws-268-facettree branch from 78992be to 7d4befb Compare January 14, 2025 09:31
var children = findChildren(observation, observations);
if (!children.isEmpty()) {
queue.addAll(children);
observation.put("children", children);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
observation.put("children", children);
observation.put("_children", children);

Since children is not a defined property

@lrosenstrom lrosenstrom force-pushed the feature/lws-268-facettree branch from ff9f414 to 4994254 Compare January 16, 2025 09:47
@lrosenstrom lrosenstrom force-pushed the feature/lws-268-facettree branch 2 times, most recently from 54965fa to 12e974a Compare January 30, 2025 14:25
@lrosenstrom lrosenstrom force-pushed the feature/lws-268-facettree branch from 1c5dee1 to f55b89b Compare June 3, 2025 08:36
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.

3 participants