Forum Discussion

PAULEM's avatar
PAULEM
Advisor
5 years ago

How does AP1 v2 "matches" work?

Hi,

Here's my API query:

https://community.ato.gov.au/api/2.0/search?q=SELECT id, view_href, body FROM messages WHERE body matches 'house-rules' LIMIT 10000

The plan is to find any links to "/t5/Getting-started/House-rules/ta-p/6" so that we can update the link to point to our FAQ page but the results include all occurrences of "house", "rule" and both.

If anyone can shed some light on this behaviour, I'd really appreciate it.

 

  • MattV's avatar
    MattV
    Khoros Staff

    I think it's working more like a search engine search, and less an exact match of  body text. I think even in the most optimistic scenario, it probably wouldn't search within HTML tags.

    If having a redirect is something you simply must have, perhaps something in the page initialization script could do the trick.