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

Search: find PascalCase, pascalcase and case at the same time #6632

Open
4 tasks done
wofsauge opened this issue Jan 10, 2024 · 6 comments
Open
4 tasks done

Search: find PascalCase, pascalcase and case at the same time #6632

wofsauge opened this issue Jan 10, 2024 · 6 comments
Labels
change request Issue requests a new feature or improvement

Comments

@wofsauge
Copy link

Context

No response

Bug description

When searching a whole word that got separated using the "separator" feature of the search plugin, it doesnt get displayed in the search results.

Example Text on website: "TestExample"
Searching "example" works.
Searching "test" works.
Searching "testexample" doesnt work.

Related links

Reproduction

9.5.3-seperator-search-full-words.zip

Steps to reproduce

we have a markdown page, that contains words with CamelCase.

When using the following search terms, we expect it to always find a result:

Search term Search results Comment
test 2 Results works
header 1 Result ( FirstExampleHeader ) works
firstexample 0 Results Doesnt find anything despite it being the start of a H2 object text
FirstExampleHeader 0 Results Doesnt find anything despite it being a H2 object text
AnotherTest 0 Results Doesnt find anything despite it being a H2 object text

Browser

No response

Before submitting

@squidfunk
Copy link
Owner

Thanks for reporting and the reproduction. This is a current limitation of the search. You can either index the entire word or parts of it, but not both. We'll be lifting these restrictions in the near future. If you want to stay updated, please subscribe to #6307, where we track progress on the new search and collect feedback.

@squidfunk squidfunk added the change request Issue requests a new feature or improvement label Jan 11, 2024
@squidfunk squidfunk changed the title Search feature doesn't recognize full version of a separated word Search: find PascalCase, pascalcase and case at the same time Feb 23, 2024
@squidfunk squidfunk reopened this Feb 23, 2024
@squidfunk
Copy link
Owner

squidfunk commented Feb 23, 2024

I'm reopening this issue, as I'm confident that this will make it into the next iteration of search. More specifically, we'll be moving splitting of words at uppercase characters out of the separator and into a search plugin, which will also provide for greater flexibility than using a regular expression. Here's a working prototype:

Ohne.Titel.mp4

This will also address all cases enumerated in the OP. Note that the interface in the video is only my research prototype. It has nothing to do with what we're planning the search interface to look in the next iteration.

@galthaus
Copy link

galthaus commented Mar 22, 2024

@squidfunk - is search going to be updated to function with - as a non-separator. This doesn't work currently and is required for our documentation set. We have lots of items like, universal-discover, that can't be found even when we remove / change the search separator.

Also, will the case splitting be removable?

@squidfunk
Copy link
Owner

squidfunk commented Mar 23, 2024

@galthaus I'm not sure what you're referring to. Could you please post a minimal reproduction with your search plugin configuration and describe what you're searching and expect to find? It is crucial for us to understand this precisely, and now is the best time since we're working on it anyway.

Also, will the case splitting be removable?

Yes, basically every behavior will be pluggable, and thus removable.

@galthaus
Copy link

@squidfunk - #6958 - it is really simple and not sure what you didn't understand. Hopefully, that will be clearer.

@squidfunk
Copy link
Owner

@galthaus thanks for the creating the issue and the reproduction.

it is really simple and not sure what you didn't understand

Sometimes, the tiniest nuances make a big difference, so we need to be sure what the problem is before we can be confident to give an appropriate answer. I hope you understand that sometimes, asking questions about things that might seem obvious to you help us to first establish a common understanding before proceeding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants