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

feat: Add option to filter search results by url/pathname #232

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

Conversation

herbertnikolajewskidci
Copy link

@herbertnikolajewskidci herbertnikolajewskidci commented Dec 9, 2024

  • filterByPathName: false

    • This option allows restricting search context to the current URL if set to true.
  • subPath: -1

    • This option only works if filterByPathName is set to true. It allows further filtering of the search context. Example: Suppose this is our endpoint: "/help/page1/subpage1/topic". If I set subPath: 2, then the search context will be limited to everything that can be found under help/page1/*. Anything that's under /help/pageX or similar will be filtered out. subPath: 3 => then only help/page1/subpage1/* not help/page1/subpage2/*, etc. The default value is set to -1, which always allows searching the current page only as search context.

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