Term Cleanup: In our elasticsearch query, filter results to only the taxonomy we want

Open
#911 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
elasticsearch, php
Domain
backend, search

Research direction

Start by reviewing the referenced classifai-cleanup commit and tracing the term-index query used for taxonomy comparisons. Confirm how post tags and categories are handled, then verify that filtering happens in Elasticsearch and that the resulting behavior matches the requested taxonomy without relying on WordPress-side removal.

Written by the indexing model from the issue text.

Description

Is your enhancement related to a problem? Please describe.

Originally reported by @dkotter:

Right now we search for matches against all terms within the term index. So if you have categories and tags indexed and you run a comparison on tags, categories will also be considered. We then remove those on the WordPress side but there's probably performance gains to be had by doing this all on the elasticsearch side.

See here for an initial test of this that seemed to work for post tags but not categories.

Designs

No response

Describe alternatives you've considered

Originally reported via https://github.com/10up/classifai-cleanup/issues/15

Code of Conduct
  • I agree to follow this project's Code of Conduct
Dominant language
PHP
Stars
714
Forks
68
Avg merge
4h 32m
Merged PRs (30d)
23

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from 10up/classifai

All issues in 10up/classifai

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.