Any help will be appreciated. Thanks!
# advice-metadata-modeling
b
Any help will be appreciated. Thanks!
e
Hey @brave-farmer-39785 let me take a look into this and get back to you
Have you tried executing this search via the UI instead of making this POST request?
b
Sorry for the late response. My dev environment is having issue. Thanks for the suggestion. Here is the response from GUI:
Same Docker error message: "[query_string] analyzer [custom_keyword] not found" What do I need to do to create the analyzer?
e
so are other search queries working okay or no?
b
It works fine for other searches. It just doesn't work for the new entity.
e
would you mind sharing the
.pdl
file you used to construct the new Vendor entity? I’m assuming you used the Searchable annotation but sometimes it can be a bit particular about syntax
b
That's correct. I am using @Searchable. VendorKey.pdl: namespace com.company.metadata.key /** * Key for a Vendor */ @Aspect = { "name": "vendorKey" } record VendorKey { /** * A unique id for the vendor. Should be separate from the name used for displaying a Vendor. */ id: string } VendorInfo.pdl: namespace com.company.vendor @Aspect = { "name": "vendorInfo" } record VendorInfo { @Searchable = { "fieldType": "KEYWORD", "enableAutocomplete": true, "queryByDefault": true, "boostScore": 10.0 } name: string phone: string contact: optional string url: optional string }
e
okay so i would actually recommend you use
"fieldType": "TEXT_PARTIAL"
if you change that, you will have to rebuild indices however
b
I can give it a try. How do I rebuild the indices?
e
b
Same error.
I also check the index which have the latest timestamp and here is the index. Is there supposed to be an analyzer entry inside the index? { "vendorindex_v2": { "aliases": {}, "mappings": { "properties": { "name": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "runId": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } }, "urn": { "type": "text", "fields": { "keyword": { "type": "keyword", "ignore_above": 256 } } } } }, "settings": { "index": { "creation_date": "1666728563660", "number_of_shards": "1", "number_of_replicas": "1", "uuid": "10JbzOc-SAy-_lcNGb0LjQ", "version": { "created": "7090399" }, "provided_name": "vendorindex_v2" } } } }
Any other suggestion? Here is the registry entry for the new entity: id: mycompany-dq-model entities: - name: dataset aspects: - customDataQualityRules - name: vendor doc: Vendor represents a company that provides products and/or services (e.g data publishers). keyAspect: vendorKey aspects: - vendorInfo
e
Hey sorry Jet taking another look
l
Hey @brave-farmer-39785 , I have been trying to create a new entity from been a while. When you are creating a new entity have you forked datahub or have you used datahub-custom-model?
I have tried datahub fork instead of custom model. I have faced so many errors which i am unaware of
Could you please help me in achieving new entity creation.