Keyword Searching in Workshop

I have a column in a workshop table that has a list of dummy emails, domains, etc. I want users to be able to do a keyword search on this column, but seem to be running into an issue. I’ve tested the search with 3 dummy values: sainsburys.com, john.doe@sainsburys.com and john.sainsburys@gmail.com. A keyword search for “sainsburys” returns the first two enablers, but not the third one. I know the issue is to do with the way Foundry tokenises strings for keyword searches with prefix searching - I have tried wildcard/advanced syntax searches, but this still doesn’t work.

Wondering if there is any workaround for this? Is this an expected result and unavoidable or can it be fixed in the front-end?

One suggestion is to add a new column to the backend that stores the emails/domains as string arrays where the email/domain is split on non-alphabetic characters. As long as this column is added as a property to the ontology, it doesn’t need to be shown in the Workshop module, but I think the keyword search should find it. I.e. email_strings: [john, sainsburys, gmail, com]

Also, a comically impractical idea here is to paste the following into the keyword search:

sainsburys* OR a*sainsburys OR b*sainsburys OR c*sainsburys OR d*sainsburys OR e*sainsburys OR f*sainsburys OR g*sainsburys OR h*sainsburys OR i*sainsburys OR j*sainsburys OR k*sainsburys OR l*sainsburys OR m*sainsburys OR n*sainsburys OR o*sainsburys OR p*sainsburys OR q*sainsburys OR r*sainsburys OR s*sainsburys OR t*sainsburys OR u*sainsburys OR v*sainsburys OR w*sainsburys OR x*sainsburys OR y*sainsburys OR z*sainsburys

1 Like

Hi,

Comical but effective! Thanks, will have a look at these approaches. Just wondering is there any reason why wildcards don’t work at the beginning of keyword searches?

I don’t know why they don’t work at the beginning, but it might be related to this documentation page where .phrasePrefix() effectively supports searches like banana* while there does not exist an equivalent method in Palantir (as far as I know) to support searches like *banana.

Link: https://www.palantir.com/docs/foundry/functions/api-object-sets#filtering