For (hyphenated) multi-word USE flags, p.g.o considers each package a match that has a USE flag matching _any_ word of the query flag. For example, consider searching for all packages providing the "gmxapi-legacy" flag via: https://packages.gentoo.org/useflags/gmxapi-legacy This USE flags appears exclusively in sci-chemistry/gromacs but matches all of the following packages on p.g.o: Packages describing “gmxapi-legacy” as local USE flag - dev-db/mysql-connector-c++[legacy] - dev-games/ogre[legacy-animations] - dev-haskell/haskeline[legacy-encoding] - dev-util/android-ndk[legacy-toolchains] - dev-vcs/fossil[legacy-mv-rm] - kde-plasma/plasma-meta[legacy-systray] - sci-chemistry/gromacs[gmxapi-legacy] - sci-libs/cgnslib[legacy] Since the matched USE flags are not actually listed on the page, one would have to assume that all these packages provide the "gmxapi-legacy" flag, with the corresponding descriptions incorrectly listed as "gmxapi-legacy flag description". Similarly, searching for "legacy-systray" results again in the same list plus all packages providing a "systray" USE flag (e.g., Spotify). This is not about finding similar (per-token) matches for a given USE flag but rather about explicitly listing the complete USE flag as local to the inexactly matched packages (including the flag descriptions). This happens on both p.g.o and ptest.g.o. Reproducible: Always
Technically, this is related to the elasticsearch mapping. So far, the USE flag name has been mapped as 'text'. Accordingly it is analyzed by elasticsearch. That's why searching for gmxapi-legacy returns gmxapi-legacy, gmxapi, legacy and the like. However, from a practical point of view, I think http://packages.gentoo.org/useflag/USEFLAG_NAME should just list packages with a exact match. That's why I have added a raw field to 'name' in: - https://gitweb.gentoo.org/sites/packages.git/commit/?h=dev/main&id=2e41907448c53bcc13946c9498a419d50e1d3a2a The raw field is mapped as keyword. This way, name and name.raw can be used side by side. Technically this is implemented using multi-fields. Furthermore name.raw is used for http://packages.gentoo.org/useflag/USEFLAG_NAME now, so that we just get exact matches. A functionally like "please list all packages that include the USE flag gmxapi-legacy, gmxapi or legacy" should not be part of http://packages.gentoo.org/useflag/USEFLAG_NAME, I think. It might, however, be achieved using advanced search queries. Does that sound like a way to go?
Sounds good to me, thanks!
This should have been resolved since we rewrote the whole application in golang. Thus I am going to close this bug. However, please don't hesitate to let us know, if you still encounter any problems.