You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/01 16:20:08 UTC
[GitHub] [superset] stephenLYZ commented on a change in pull request #18662: feat(viz-gallery): add 'feature' tag and fuzzy search weighting
stephenLYZ commented on a change in pull request #18662:
URL: https://github.com/apache/superset/pull/18662#discussion_r816927659
##########
File path: superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx
##########
@@ -545,7 +589,18 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
if (searchInputValue.trim() === '') {
return [];
}
- return fuse.search(searchInputValue).map(result => result.item);
+ return fuse
+ .search(searchInputValue)
+ .map(result => result.item)
+ .sort((a, b) => {
Review comment:
Yes, now we use `CHART_LABEL_ORDER` array to determine the search weight, and the larger the `index`, the larger the `weight`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org