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

Use SearchResult component #14867

Merged
merged 5 commits into from
Feb 22, 2021
Merged

Use SearchResult component #14867

merged 5 commits into from
Feb 22, 2021

Conversation

tsmacdonald
Copy link
Member

@tsmacdonald tsmacdonald commented Feb 17, 2021

...and update the backend to return much richer match data

[Fixes #14832]

image

:name (if (or (= column :name) (nil? display_name)) name display_name)
:matched_column column
:matched_text match
:context (when-not (#{:name :display_name :collection_name} column) match-context) ;; TODO pull this out somewhere more responsible
Copy link
Member Author

Choose a reason for hiding this comment

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

these "magic" column names should live in search.config and both the when-not and if (L141) are a little jank, but I think the surrounding logic is going to change in the near future and don't want to waste cycles overoptimizing

@tsmacdonald tsmacdonald marked this pull request as ready for review February 18, 2021 21:58
@tsmacdonald tsmacdonald force-pushed the search-api-response-14832 branch 2 times, most recently from 5ad6b6c to b7a6a77 Compare February 18, 2021 22:07
@codecov
Copy link

codecov bot commented Feb 18, 2021

Codecov Report

Merging #14867 (b7a6a77) into master (4fba5cf) will decrease coverage by 0.00%.
The diff coverage is 82.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14867      +/-   ##
==========================================
- Coverage   83.93%   83.92%   -0.01%     
==========================================
  Files         389      389              
  Lines       30485    30504      +19     
  Branches     2171     2171              
==========================================
+ Hits        25587    25600      +13     
- Misses       2727     2733       +6     
  Partials     2171     2171              
Impacted Files Coverage Δ
src/metabase/search/scoring.clj 92.37% <82.35%> (-4.60%) ⬇️
src/metabase/models/query.clj 85.41% <0.00%> (ø)

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 d4bb3c4...5625858. Read the comment docs.

Update the backend to return much richer match data

[Fixes #14832]
Copy link
Member

@kdoh kdoh left a comment

Choose a reason for hiding this comment

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

Looks like a few things are missing before this can go in and we can test further.

  1. We should use SearchResult on both the full search results page and in type ahead results.
  2. The Our analytics collection isn't showing up as the collection when something is saved there. I think that's due to the back end treating that collection strangely.
  3. I think Metrics and Segments might not be accounted for yet which also tells me we need to improve our fallback case.

frontend/src/metabase/search/components/SearchResult.jsx Outdated Show resolved Hide resolved
tsmacdonald and others added 3 commits February 22, 2021 12:02
…14894)

* Increase the memoization cache for search scoring by common subseq

Also limit the size of input it can get

(Hopefully) [Fixes #14852]

* Don't group search results by type (#14898)

Respect the sorting done by the backend
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.

Return richer API response for search
3 participants