mojira.dev
MC-265241

Recipe book search no longer finds relevant items in languages where compound words are not separated

In 1.20.2 pre1, the search functionality of the recipe book was changed:

The search will only match the beginning of any word in the item's name.
For example, searching for "tor" will still show Torch and Redstone Torch but not Daylight Detector anymore

However, this change was very anglo-centric. The recipe book search now no longer works well for some, if not most, non-English languages.

This is because the new search assumes that every compound word is separated by spaces, which is just not the case in most languages.

Examples

All examples are from German, but I'm certain other languages are affected as well:

  • When searching for "Fackel" (torch), you no longer find "Seelenfackel" (soul torch) - but "Redstone-Fackel" (redstone torch) still can be found

  • When searching for "Spitzhacke" (pickaxe), you no longer find anything, because pickaxes are compound words like "Goldspitzhacke" (golden pickaxe)

  • Searching for "Stufe" (slab) will no longer find anything, since "stufe" is part of the word (example: "Sandsteinstufe", sandstone slab)

Linked issues

Comments 3

Perhaps the better behavior would be a mix between old and new search, eg sorting items that don't start with the search query, but do contain it, at the end of the results.

This problem extends to the english language as well. Notably "stonecutter" and "crossbow".

I agree with @unknown. When searching for recipes, items whose names exactly begin with the search query should appear first, and items whose names merely contain the search query should appear second. Within each of those categories, recipes should be sorted alphabetically. This is similar to how sorting for command autocomplete was solved in MC-182309.

However, the 1.20.2 pre-release 1 article mentions that it is desirable to not overwhelm new players with many recipes that they have never seen before.

This will enable experienced players to find the recipes they are looking for (even if it hasn't been unlocked yet) without overwhelming new players

To fulfill the needs of both experienced players and new players, perhaps a new option should be added to the game settings that determines whether search results can contain recipes that haven't been unlocked yet. This option could default to off so that new players wouldn't be overwhelmed by many unfamiliar recipes in search results, but experienced players could toggle the option to on. This would be similar to how the "Operator Items Tab" option was added to the "Controls" settings menu in 22w45a to allow convenience for experienced players without overwhelming new players.

violine1101

(Unassigned)

Confirmed

Platform

Very Important

Accessibility

recipe-book, search

1.20.2 Pre-release 1

1.20.2 Pre-release 2

Retrieved