Post

2 followers Follow
0
Avatar

Match part of url

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!

dirkbonhomme

Please sign in to leave a comment.

2 comments

0
Avatar

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](http://www.example.com/blog)"

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

links.domain in "example.com"

Hope that helps!

Paul M. 0 votes
Comment actions Permalink
0
Avatar

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

dirkbonhomme 0 votes
Comment actions Permalink