-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.4] Smart Search: Limiting highlighting of tokens #41463
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Quy
reviewed
Aug 26, 2023
Co-authored-by: Quy <quy@nomonkeybiz.com>
I have tested this item ✅ successfully on 191e612 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41463. |
1 similar comment
I have tested this item ✅ successfully on 191e612 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41463. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41463. |
Under |
…s into 4.3-finder-highlighter
I have tested this item ✅ successfully on edfb611 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41463. |
HLeithner
added a commit
that referenced
this pull request
Sep 19, 2023
* [4.4] Upmerge (#41733) * [4.3] fix localised cli installation (#41706) * [4.3] Work around a successful upgrade with silent errors (#41367) * Log all * Capture errors * Log messages * Error collector * Error collector * More error collecting * More error collecting * Show errors * Cli command check errors * phpcs * phpcs * Back button and better text * phpcs * logs * Make sure logging is working before continue * Apply suggestions from code review --------- Co-authored-by: Richard Fath <richard67@users.noreply.github.com> Co-authored-by: Harald Leithner <leithner@itronic.at> * cs --------- Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com> Co-authored-by: Fedir Zinchuk <getthesite@gmail.com> Co-authored-by: Richard Fath <richard67@users.noreply.github.com> * [4.3] Fix untranslated constants in script.php (#41734) * restrict choicesjs input on container (#41478) * [4.4] Add Joomla 5 compat plugin to 4.4.0 to fix class "JPlugin" not found error on update to 5 (#41738) * Add J5 compat plugin to 4.4.0 * Adapt provider.php to latest changes in 5.0-dev * Add to ExtensionsHelper * Use protected = 0 * Better XML description. * Use correct creationDate in XML file Co-authored-by: Brian Teeman <brian@teeman.net> --------- Co-authored-by: Brian Teeman <brian@teeman.net> * [4.4] Smart Search: Limiting highlighting of tokens (#41463) * Smart Search: Limiting highlighting of tokens * Update components/com_finder/tmpl/search/default_results.php Co-authored-by: Quy <quy@nomonkeybiz.com> * Adding inline help text --------- Co-authored-by: Quy <quy@nomonkeybiz.com> Co-authored-by: Olivier Buisard <olivier.buisard@simplifyyourweb.com> Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com> Co-authored-by: Martin Carl Kopp <6154099+MacJoom@users.noreply.github.com> * No longer a code owner build.xml is part of the testing team stuff and the rest I’m removing myself from * Fields is maintained by everybody now * Invalid import from upmerge * Set the configuration options through a command (#41787) * Set the configuration options through a command * cs * PHP 8.2 Creation of dynamic property (#41554) * Fix deprecated message in categories (#41587) * [4.3] fix finder common words (#41468) * [4.3] Fix missing filter for subject (#41726) * Fixed database upmerge conflicts * Update installation/sql/mysql/base.sql Co-authored-by: Richard Fath <richard67@users.noreply.github.com> --------- Co-authored-by: heelc29 <66922325+heelc29@users.noreply.github.com> Co-authored-by: Fedir Zinchuk <getthesite@gmail.com> Co-authored-by: Richard Fath <richard67@users.noreply.github.com> Co-authored-by: Magnus Singer <work@magnus-singer.com> Co-authored-by: Brian Teeman <brian@teeman.net> Co-authored-by: Hannes Papenberg <info@joomlager.de> Co-authored-by: Quy <quy@nomonkeybiz.com> Co-authored-by: Olivier Buisard <olivier.buisard@simplifyyourweb.com> Co-authored-by: Allon Moritz <allon.moritz@digital-peak.com> Co-authored-by: Martin Carl Kopp <6154099+MacJoom@users.noreply.github.com> Co-authored-by: George Wilson <georgejameswilson@googlemail.com> Co-authored-by: Denitz <197527+Denitz@users.noreply.github.com> Co-authored-by: Christiane Maier-Stadtherr <dev@chmst.de>
Kostelano
added a commit
to JPathRu/localisation
that referenced
this pull request
Oct 19, 2023
joomla/joomla-cms#41733 + joomla/joomla-cms#41738 + joomla/joomla-cms#41463 + joomla/joomla-cms#41757 + joomla/joomla-cms#41947 + joomla/joomla-cms#42047 - (только для en-GB, в ru-RU отсутствует)
This was referenced Feb 29, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request for Issue #28239.
Summary of Changes
Depending on the language and smart search settings, smart search might find a lot of compound words and tokens for a small search entry. These tokens then are all converted into code for the highlighting script, which is then added to the URL of each search result. In worst case, this can make the URL to long to be processed by the webserver. This PR limits the maximum amount of tokens to 10, so that doesn't get out of hand. Yes, this does mean, that some terms, which would be part of the search result, don't get highlighted, but I'd rather have some terms not highlighted than the page breaking completely.
Testing Instructions
Search for something with more than 10 different words, for example in the test sampledata "Thanks for helping us to test Joomla! We're getting ready for the release of Joomla and we appreciate you helping us". Look at the sourcecode of the page and look for the block containing
"class": "js-highlight",
. Below you will find a list of all search terms it is highlighting.Actual result BEFORE applying this Pull Request
The list contains more than 10 words, in the case of the above search phrase it is 23.
Expected result AFTER applying this Pull Request
The list is limited to 10 words.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed