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

Fix for Filter-Based API Search with Space Characters in DevPortal #12842

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nimsara66
Copy link
Contributor

Purpose

The current DevPortal API search supports multiple filter criteria, introduced in PR [1][2]. However, this update inadvertently broke the previous behavior where tags containing space characters were supported. For example, APIM 3.2.0 allowed searches like tag:Sample APIs - New.

This PR resolves the issue by restoring support for space-containing tags in search queries. Additionally, it ensures that both tag and tags filters function correctly when used with space characters.

Supported Search Examples

  • tag:Sample APIs - New
  • tags:Sample APIs - New tags:pizza

Approach

The solution modifies the search logic by concatenating the following search components into the previous filter criteria:

Example Transformations

  1. tag:Sample APIs - New name:Googletag:Sample APIs - New && name:Google
  2. Google tag:Sample APIs - Newname:Google && tag:Sample APIs - New
  3. Google tags:Sample APIs - New tags:pizzaname:Google && (tags:Sample APIs - New || tags:pizza)
  4. tags:pizzatags:pizza
  5. name:google tag:Sample APIs - New tag:pizza name:abc(name:Google || name:abc) && (tags:Sample APIs - New || tags:pizza)

[1] #12370
[2] #12466

Related issue

Issue: wso2/api-manager#3535
Internal: https://github.com/wso2-enterprise/wso2-apim-internal/issues/8509

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