openedx / edx-platform

The Open edX LMS & Studio, powering education sites around the world!
https://openedx.org
GNU Affero General Public License v3.0
7.09k stars 3.79k forks source link

feat: implicitCount added to content search index #35000

Closed ChrisChV closed 1 week ago

ChrisChV commented 2 weeks ago

Description

Adds implicit_count to content search index.

Supporting information

Testing instructions

openedx-webhooks commented 2 weeks ago

Thanks for the pull request, @ChrisChV! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

bradenmacdonald commented 1 week ago

Can't you just compute this from the response? The implicit_count should always be equal to tags.level0.length + tags.level1.length + tags.level2.length + tags.level3.length. So do we really need to store it in the index as a separate field?

ChrisChV commented 1 week ago

Can't you just compute this from the response? The implicit_count should always be equal to tags.level0.length + tags.level1.length + tags.level2.length + tags.level3.length. So do we really need to store it in the index as a separate field?

Yes, it was one of my options, but I think that adding to the index would be the easiest way to obtain tag count without having to calculate it in all the responses that need the count tag. If you need the count tags it's easy to get it from the index. What do you think?

bradenmacdonald commented 1 week ago

I think it's so simple to calculate that we might as well just calculate it ourselves when we need it. But if we need to sort by the tag count or filter by the tag count, then we definitely need to add to the index. If we don't need that, I wouldn't bother personally.

ChrisChV commented 1 week ago

I think it's so simple to calculate that we might as well just calculate it ourselves when we need it. But if we need to sort by the tag count or filter by the tag count, then we definitely need to add to the index. If we don't need that, I wouldn't bother personally.

Make sense. Updated: https://github.com/open-craft/frontend-app-course-authoring/pull/41/commits/0843a1e699815eb72302d0362f541effb128af0c

ChrisChV commented 1 week ago

This index change is not longe necessary for now.

openedx-webhooks commented 1 week ago

@ChrisChV Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.