COR-789: Tag Search Issues #510
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose:
This PR implements the ability to search Legacy Posts by Tag(s). Originally, the issue was that providing a tag term in a general full-text search query no longer acted as expected. Specifically, searching for a tag like
node-jswould return results withnodein the body/description/etc. This is correct full-text search behavior, but was not intended behavior for the team needing this functionality. To implement this functionality, we decided a separate search term just fortagswas necessary for the feed and non-feed endpoints. The mappings fortagswere explicitly defined to avoid hyphenatedtagsbeing tokenized as separate strings. Additionally, multiple, comma-separated tags can be specified, which will return any posts that match any of the provided tags.JIRA:
https://cb-content-enablement.atlassian.net/browse/COR-789
Steps to Take On Prod
Upon deployment, you must rebuild the indices (
bundle exec rake cortex:rebuild_indexes)Changes:
Changes to setup
Architectural changes
Migrations
Library changes
Side effects
Screenshots
Before
N/A
After
N/A
QA Links:
http://web.cortex-3.development.c66.me/
How to Verify These Changes
Specific pages to visit
Steps to take
node-js, that?tags=nodeor?tags=jsdo not return the post in question. Partial matches are not supported for search-by-tag.Responsive considerations
Relevant PRs/Dependencies:
N/A
Additional Information
develop.