Hi everyone! Is there a way to make CustomProperti...
# advice-metadata-modeling
a
Hi everyone! Is there a way to make CustomProperties aspect searchable by @Searchable annotation? (So when I am creating a new entry in the map, it can be searched by the UI). I have tried with fieldType: OBJECT, but it seems map type attributes are not acceptable. Thank you in advance for helping!
a
Hi, you should be able to used advanced search here- https://datahubproject.io/docs/how/search/#advanced-queries
a
Thanks @astonishing-answer-96712! Is there any way to extend this feature to search for entities that I have created? (with an aspect inherited from CustomProperties of course)
a
It should work with custom entities, are they showing up in your ES instance?
i
Hi @astonishing-answer-96712 sorry for breaking in, I’m trying to get used custom-model approach (without a fork) and was able to render them in the UI, however I can’t see these custom aspects to be searcheable. Here is my custom model:
Copy code
namespace com.mycompany.access

import com.linkedin.common.CustomProperties
import com.linkedin.common.ExternalReference

@Aspect = {
  "name": "customAccessRules",
  "autoRender": true,
  "renderSpec": {
    "displayType": "properties",
    "displayName": "Access"
  }
}

record CustomAccessRules includes CustomProperties, ExternalReference {
  @Searchable = {
    "fieldType": "TEXT_PARTIAL",
    "addToFilters": true,
    "enableAutocomplete": true,
    "hasValuesFieldName": "hasAccessGroupsRead"
  }
  accessGroupsRead: string

  @Searchable = {
    "fieldType": "TEXT_PARTIAL",
    "addToFilters": true,
    "enableAutocomplete": true,
    "hasValuesFieldName": "hasAccessGroupsWrite"
  }
  accessGroupsWrite: string
}
The idea behind this is to feed in Table grant information into this Access tab as Custom aspect. But for further use, we want to get this searchable, to get all entities by querying like
Copy code
/q customAccessRules: accessGroupsRead=AD_Readers_Security_Group
Is this possible without forking? Which index should persist this custom aspect information?
a
It’s not showing up when filtering with aspects in the advanced search?
a
It is not 😞 I was trying with GlossaryTerms also, created a custom property, but it did not show up either. Maybe I am missing some steps 😞
a
Huh, this may have to do with recent changes in the filtered search configuration, cc @big-carpet-38439