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 2021/01/26 20:35:59 UTC

[GitHub] [superset] nikolagigic commented on a change in pull request #12770: chore(explore): Reorder dataset search results based on property relevance

nikolagigic commented on a change in pull request #12770:
URL: https://github.com/apache/superset/pull/12770#discussion_r564815370



##########
File path: superset-frontend/src/explore/components/DatasourcePanel.tsx
##########
@@ -109,45 +111,41 @@ export default function DataSourcePanel({
     metrics,
   });
 
+  function searchByRelevance(
+    datasource: Array<ColumnMeta | Metric>,
+    value: string,
+    isMetrics = false,
+  ) {
+    const properties = [
+      isMetrics ? 'metric_name' : 'column_name',
+      'description',
+      'verbose_name',

Review comment:
       the problem with this is that columns with description containing the searched keyword will go to the top, which is not what we want @junlincc could you chime in on this?




----------------------------------------------------------------
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.

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