Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ag/more tag params #36

Merged
merged 6 commits into from
Jul 17, 2024
Merged

Ag/more tag params #36

merged 6 commits into from
Jul 17, 2024

Conversation

fredex42
Copy link
Collaborator

@fredex42 fredex42 commented Jul 14, 2024

What does this change?

Adds some more tag search parameters, hopefully to help Ask Guardian! 🤞

  • Fuzzy-matching on the tag name
  • Matching on tag categories and references
  • Return of matching documents in a sub-query on tags

How to test

{
	tag(q:"footbowl",type:keyword,limit:5) {
    totalCount
    endCursor
    nodes {
      webTitle
      id
      internalName
    }
    matching_content(limit:10, orderDate:published, orderBy:newest, excludeTags:["politics/politics"]) {
      totalCount
      endCursor
      nodes {
        id
        webTitle
        keywords:tags(type:keyword) {
          id
        }
      }
    }
  }
}

You should get matching tags for Football, katine/football, Women's Football, Fantasy Football....

Also, you should get a ton of hits in matching_content which can be paginated through by taking the endCursor value and putting it into a cursor: parameter in the matchingContent query.

  • Have a play with the different options

To Do

  • Fix cursor pagination for tags
  • Add a selector for content matching each single tag (on the Tag object)

How can we measure success?

Another way of exploring Guardian content

Have we considered potential risks?

Keep an eye on query complexity

Copy link

github-actions bot commented Jul 15, 2024

Unit Test Results

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ±0 

Results for commit 96d0bbb. ± Comparison against base commit dd1d0d1.

♻️ This comment has been updated with latest results.

@fredex42 fredex42 merged commit 2ae4ead into main Jul 17, 2024
6 checks passed
@fredex42 fredex42 deleted the ag/more-tag-params branch July 17, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant