Consider adding a "Whole word" checkbox to search bar
Categories
(Webtools :: Searchfox, enhancement)
Tracking
(Not tracked)
People
(Reporter: nika, Unassigned)
References
(Depends on 1 open bug)
Details
It might be nice to add a tickbox, like "regexp search" or "case-sensitive" for performing a "whole word" search. It'd have a similar effect to adding a \b (word boundary) match pattern to the beginning and end of the search query.
This could be good when searching for specific identifiers which are often substrings of other identifiers.
Comment 1•2 years ago
|
||
For the "query" endpoint (which is not yet ready for consumption), we now prioritize match quality for semantic matches. Specifically, I introduced the concept of SymbolQuality I added an ExactIdentifier which is distinct from the IdentifierPrefix(how many matched, how many characters come after the match) which provides a PartialOrd/Ord which we use to order the QualKindDescriptors via a BTreeMap.
We do not currently do anything for the fulltext hits.
I think viable next steps for this bug would be:
- Make sure that "exact match" or "word match" is an option for faceting purposes to exclude non-exact/word matches. This could eventually be used as the basis for constructing an actual exact match query which probably would just want to be a term like
word:orexact:which would expand to an (exact) identifier search under the hood, plus adding\bor what not to the text search escaped into a regex.- In particular, part of the UX vision for the "query" endpoint is there aren't any additional UI widgets you need to modify ahead of time before your query is formed, but instead faceting options are provided. That said, we could still end up with something like a "I want to know what my options are, show me the 'advanced' search" page which shows a page that shows all the options from https://github.com/mozsearch/mozsearch/blob/master/tools/src/query/query_core.toml which would include "word"/"exact".
- Enhance ingest_fulltext_hits or upstream of that to do an additional step to check the match and categorize it similarly to ExactIdentifier/IdentifierPrefix.
Description
•