Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Dedup fields into generalized search field. #2033

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

4ndygu
Copy link
Contributor

@4ndygu 4ndygu commented Jan 7, 2022

not ready yet, but this is mostly for visibility's sake.

This PR adds a new search field to the elasticsearch backend that consists of all previously queryable fields, joined into a single space-delimited field. This allows us to cut a lot of nested logic from the search parameter and avoid the complexity that deals with search queries that span multiple nested field (e.g. wanting a search that looks for an OR relationship between one opinion, but also another case title).

the costs of the current implementation below are:

  • repeated calls of the prepare_%s functions
  • ugliness of the way fields are currently added into the filter_set variable

Screen Shot 2022-01-06 at 8 25 29 PM

attached is a successful test deploy of a query in both the case name and in the case body text.

@codecov
Copy link

codecov bot commented Jan 7, 2022

Codecov Report

Merging #2033 (9f44628) into develop (02a8c16) will decrease coverage by 0.24%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2033      +/-   ##
===========================================
- Coverage    62.94%   62.69%   -0.25%     
===========================================
  Files          103      103              
  Lines        11488    11493       +5     
===========================================
- Hits          7231     7206      -25     
- Misses        4257     4287      +30     
Impacted Files Coverage Δ
capstone/capstone/capapi/filters.py 79.38% <0.00%> (-7.01%) ⬇️
capstone/capstone/capapi/serializers.py 92.85% <0.00%> (-2.11%) ⬇️
capstone/capstone/capapi/documents.py 91.07% <0.00%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 559a4bc...9f44628. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant