From A Place for Everything, by Judith Flanders (Basic Books, 2020), Kindle pp. 45-46:
On the other side of the globe and in an entirely nonalphabetic writing system, in China during the Han dynasty (206 BCE–221 CE), organizing principles were well in advance of the West’s as far as government administration was concerned. Emperor Cheng (51–7 BCE) commissioned an inventory and catalog of all documents in the imperial archives. Three imperial libraries were built and catalogs were drawn up, organized into subject categories: general summaries, the Confucian classics, philosophy, poetry, warfare, divination, and medicine. Dictionaries were also compiled. The Cangjie Primer (c. 220 BCE) was intended as a textbook to teach children their Chinese characters. It has not survived, but was said to have categorized the characters by meaning and by their structure. So “madness,” “blemish,” “sore head,” and “burn” were grouped together, all being related to the character for “illness.”
This was followed by the Erya (c. 200 BCE), which has been called the first Chinese dictionary. It too was divided topically, by subject, with linked words grouped together within each category, although the connections are not necessarily ones we recognize today: roads and bridges were considered to originate from the court of the emperor, and thus they appear under the heading “Interpreting the Court”; warfare too was the province of the ruler, who was divinely ordained, and thus it fell into the section dedicated to “Interpreting the Heavens.” In around 100 CE the Shuō wén jiě zì dictionary, containing some 9,500 characters, originated a sorting system based not on meaning but on the manner in which a character was written. Each was defined as either a single unit or a compound character, and then categorized by 540 elements, called radicals, which might be semantic elements of the character or might be graphic ones—the direction of a stroke, for example. Each character was then listed under a single radical, which came to define it for lexicographical purposes.