Match part of url


#1

Based on the documentation, I was under the impression that queries are matched against unshortened links. Example:

No results come in when I use a substr/contains query with “example.com/blog

Is it correct to assume that queries are matched against shortened links (t.co) instead of the original links? If so, how can I get the desired results?

Thanks!


#2

Hi,

It sounds like you are using a target that will not contain any URLs, with targets such as twitter.text all URLs and mentions are stripped out and stored in their own targets. This is documented here.

So you can either search the raw text for a url by doing something like:

interaction.raw_content substr "www.example.com/blog"

Or you can search the links directly by doing something like:

links.domain in "example.com"

Hope that helps!


#3

I wasn’t aware of the raw_content target. Totally makes sense now. Thanks!