Area: Product Issues
Sub-Area: Search and Filtering
Applies to: OSS + Cloud
Issue
Search results don't rank high-usage assets first, or the Environment filter doesn't list all the environments you expect, for example for Airflow pipelines.
You Might Be Asking
- Why aren't my high-usage datasets appearing first in search results?
- Why can't I see all my environments in the Environment filter?
- How do I get more sort options in search results?
- Why do my Airflow pipelines not appear under any environment in the filter?
Cause
Ranking. DataHub Core ranks results by how closely the query matches textual fields. It does not use usage. DataHub Cloud combines textual relevance, usage (queries and views) and change frequency.
Environment filter, empty environment. The Airflow plugin cluster setting sets the env of the pipeline. It defaults to prod. The plugin uppercases the value and keeps it only if it is a valid environment type (FabricType). If it is not valid, the pipeline's env stays empty, and the Environment filter can't match it.
Environment filter, value limit. A filter returns only its top values. In OSS, each facet returns 20 values by default (ELASTICSEARCH_QUERY_DEFAULT_MAX_AGG_VALUES), and the value is capped by maxTermBucketSize (default 60). Values below the cutoff are missing from the dropdown. In Cloud v2.4.4, the filter value request asks for 40 values.
Solution
Search ranking
- If you use DataHub Cloud, upgrade to the latest release. Cloud v0.3.17.1 added "Search (V2.5)" ranking updates, including tag-aware rescoring and stronger demotion of non-production and backup-style assets. See the v0.3.17 release notes.
- If you use DataHub Core, usage does not affect ranking. To change ranking on a self-hosted instance, use a search configuration YAML file that GMS loads. Set
ELASTICSEARCH_QUERY_CUSTOM_CONFIG_ENABLED(defaulttrue) andELASTICSEARCH_QUERY_CUSTOM_CONFIG_FILE. The file lists profiles selected byqueryRegex, withboolQueryandfunctionScoresections. Test the file before you use it in production. See Customizing Search. - If you use DataHub Cloud and need a change to ranking, or need other sort options, contact DataHub Support. You can't change server settings yourself. Cloud v2.4.4 sort options include name A to Z, name Z to A, and last modified in source.
Environment filter
- Set the Airflow plugin
clustersetting in the[datahub]section to a valid FabricType value. Valid values includeDEV,TEST,QA,UAT,EI,PRE,STG,NON_PROD,PROD,CORP,RVW,PRDandTST. Usestginstead ofstaging. See the plugin configuration. - Check your plugin version. Plugin 1.7.0.20 requires Airflow 3.0 or later and Python 3.10 or later. If you run Airflow 2.x, pin
acryl-datahub-airflow-pluginto 1.6.0 or earlier, the last release with Airflow 2 support. - If you want to remove existing Airflow entities before you re-ingest, preview first. Don't use
--envwith the old value to find them. A flow with an invalid cluster has an emptyenv, so--envcan't match it.
# Preview. --dry-run prints the entities and deletes nothing.
datahub delete --platform airflow --dry-run
- Review the list. To narrow it, add
--entity-type. Then run the delete without--dry-run.datahub deleteis a soft delete by default.--hardis a separate, permanent delete. To undo a soft delete, usedatahub delete undo-by-filter. See delete metadata.
datahub delete --platform airflow
- Re-run ingestion so the pipelines get a valid
env. - If the filter still lists too few values and
envis valid, a facet limit is the likely cause. On self-hosted DataHub, raiseELASTICSEARCH_QUERY_DEFAULT_MAX_AGG_VALUES. It stays capped bymaxTermBucketSize. On DataHub Cloud, contact DataHub Support.
You can also narrow results with Advanced Filters. Click Advanced at the top right of the filter panel. See Advanced filters.
Verify
- Open the search results and check that the Environment filter lists your environments.
- Check that your Airflow pipelines appear under the expected environment.