plone / guillotina

Python AsyncIO data API to manage billions of resources
https://guillotina.readthedocs.io/en/latest/
Other
187 stars 51 forks source link

Fixing keyword not search and aggregation endpoint #1073

Closed bloodbare closed 3 years ago

codecov-io commented 3 years ago

Codecov Report

Merging #1073 (971d1f9) into master (ba72ad7) will increase coverage by 0.1%. The diff coverage is 97.5%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1073     +/-   ##
========================================
+ Coverage    94.5%   94.6%   +0.1%     
========================================
  Files         335     335             
  Lines       28910   28944     +34     
========================================
+ Hits        27310   27358     +48     
+ Misses       1600    1586     -14     
Impacted Files Coverage Δ
guillotina/contrib/catalog/pg.py 82.4% <91.0%> (+0.1%) :arrow_up:
guillotina/api/__init__.py 100.0% <100.0%> (ø)
guillotina/api/aggregation.py 93.4% <100.0%> (ø)
guillotina/tests/test_catalog.py 100.0% <100.0%> (ø)
guillotina/contrib/redis/driver.py 84.3% <0.0%> (-2.2%) :arrow_down:
guillotina/contrib/pubsub/utility.py 84.8% <0.0%> (-2.1%) :arrow_down:
bloodbare commented 3 years ago

I'm not sure, maybe we need to update this line as well?

https://github.com/plone/guillotina/blob/01fc3fe3dbed0e4f1b85b9ae2a89be6df6755026/guillotina/contrib/catalog/pg.py#L206

The PR is to fix the __not on keywords. Right now is not working because ? and ?| are not working. Which use case are you referencing?

masipcat commented 3 years ago

I was thinking:

if operator == "?" and isinstance(result, list):
    operator = "?|"
elif operator == "NOT ?" and isinstance(result, list):
    operator = "NOT ?|"