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

fix: gravsearch and count queries include deleted resources for some queries with negation patterns (DEV-2189) #2682

Merged
merged 3 commits into from May 30, 2023

Conversation

BalduinLandolt
Copy link
Collaborator

@BalduinLandolt BalduinLandolt commented May 30, 2023

Pull Request Checklist

Task Description/Number

Issue Number: DEV-2189

Basic Requirements

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • fix: represents bug fixes
  • refactor: represents production code refactoring
  • feat: represents a new feature
  • docs: documentation changes (no production code change)
  • chore: maintenance tasks (no production code change)
  • test: all about tests: adding, refactoring tests (no production code change)
  • other... Please describe:

Does this PR introduce a breaking change?

  • Yes
  • No
  • Maybe (not 100% sure => check with FE)

Does this PR change client-test-data?

  • Yes (don't forget to update the JS-LIB team about the change)
  • No

@linear
Copy link

linear bot commented May 30, 2023

DEV-2189 Resource counts don't match

For the project Théâtres de Société (0103, ls-prod server), we need the count of plays (représentations) by periods of time:

  • <1700
  • 1700-1799
  • 1800

Advanced search

When we make a search with only the resource Play, we get a total count of 1814 plays.

If I make 2 searches with the property Date - and the operators "exists" and "not exists" - I get a total count of 1848 plays.

Why this difference?

Search results

When you search for the plays where the date does not exist, it is displayed "72", but if you actually count the resource in the list, there are 24 listed resources - not even 25 on the first page of results!!!

Screenshot 2023-05-24 at 16.50.53.png

@BalduinLandolt BalduinLandolt self-assigned this May 30, 2023
@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Patch coverage: 31.86% and project coverage change: -67.26 ⚠️

Comparison is base (7af1c27) 85.13% compared to head (2c32886) 17.88%.

❗ Current head 2c32886 differs from pull request most recent head 6f4dfb1. Consider uploading reports for the commit 6f4dfb1 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2682       +/-   ##
===========================================
- Coverage   85.13%   17.88%   -67.26%     
===========================================
  Files         277      277               
  Lines       28958    28859       -99     
===========================================
- Hits        24654     5162    -19492     
- Misses       4304    23697    +19393     
Impacted Files Coverage Δ
.../org/knora/webapi/messages/OntologyConstants.scala 98.35% <0.00%> (-1.27%) ⬇️
...min/responder/listsmessages/ListsMessagesADM.scala 0.00% <0.00%> (-70.71%) ⬇️
...rmissionsmessages/PermissionsMessagesUtilADM.scala 70.45% <0.00%> (-29.55%) ⬇️
...knora/webapi/messages/util/PermissionUtilADM.scala 32.53% <0.00%> (-53.02%) ⬇️
...rg/knora/webapi/messages/util/rdf/JsonLDUtil.scala 38.73% <0.00%> (-38.07%) ⬇️
...a/webapi/messages/util/search/QueryTraverser.scala 1.17% <0.00%> (-91.14%) ⬇️
...nora/webapi/messages/util/search/SparqlQuery.scala 0.00% <ø> (-82.25%) ⬇️
...ravsearch/prequery/AbstractPrequeryGenerator.scala 0.00% <0.00%> (-85.72%) ⬇️
...search/prequery/InferenceOptimizationService.scala 3.12% <0.00%> (-84.76%) ⬇️
...gravsearch/transformers/ConstructTransformer.scala 6.66% <0.00%> (-63.34%) ⬇️
... and 49 more

... and 169 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@BalduinLandolt BalduinLandolt enabled auto-merge (squash) May 30, 2023 14:46
@BalduinLandolt BalduinLandolt merged commit 668a734 into main May 30, 2023
10 checks passed
@BalduinLandolt BalduinLandolt deleted the wip/DEV-2189-fix-resource-count-for-not-exists branch May 30, 2023 16:21
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.

None yet

2 participants