Skip to main content
Question

Keyword Matching Only Works on Exact Word


Forum|alt.badge.img+3

I found this post: Help creating a script to tag products with keywords from product titles.  Using the code with the adjustments the script runs, but not well.  I am hunting keywords in course descriptions for a sustainability tracking and awards system.

The problem is when this searches for keywords it's too literal. If the course description has "...equal.." then it will attach that link. If the description has "...equality..." it will not. Originally the keyword list had the asterisk wildcard, which meant there was a lot of things it wasn't finding because it doesn't seem to recognize that as a wildcard, but that lack of wildcard means it's missing possible links now. I would prefer not to add every iteration of "equal" to my keywords list though.

How do I address the problem I’m experiencing programmatically?

2 replies

mtrebinonixon

Have you tried to use Airtable’s integrated AI to extract the keywords?

I would suggest to run the AI prompt within an automation, so the next action block adds them to a multiple select field called “Keywords”.

By having the Keywords column as a multiple select then you’ll be able to use it as a nice and easy filter both in the data and interfaces layer.


Forum|alt.badge.img+3
  • Participating Frequently
  • 13 replies
  • March 27, 2025

Instead of using == for matching, you can use the includes() method.

e.g.

Equal == Equality would return False

but

if Equality.includes(“Equal”) it would return True

 

For wildcard matching, you can add a condition to see if a word startsWith(“*”) or endsWith(“*”).

If it returns True then you can put a condition to compare the word without the asterisk.


Reply