]> source.dussan.org Git - sonarqube.git/commit
SONAR-11472 Add support for exact search-query matching
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Wed, 26 Dec 2018 11:49:27 +0000 (12:49 +0100)
committerSonarTech <sonartech@sonarsource.com>
Thu, 10 Jan 2019 19:21:02 +0000 (20:21 +0100)
commit42fdf73a492026a854a4a36d515df02e239bb82a
treec60f6b89c21c3213fc2de887dc4f246f404f68ed
parent96aa28fc529efd7582ca959297d2d77d88f3085c
SONAR-11472 Add support for exact search-query matching

Out of the box, Lunr doesn't support exact pattern matching for
search queries, meaning searching for "foo bar" will not boost
a sentence like "Foo bar baz" more than "Baz bar foo" (both
contain both keywords). We now do some crude pattern matching by
storing the token "context" upon indexing. It's not 100% correct,
but it gets the job done.
server/sonar-docs/src/layouts/components/Search.js
server/sonar-web/src/main/js/@types/lunr.d.ts
server/sonar-web/src/main/js/apps/documentation/components/App.tsx
server/sonar-web/src/main/js/apps/documentation/components/SearchResultEntry.tsx
server/sonar-web/src/main/js/apps/documentation/components/SearchResults.tsx
server/sonar-web/src/main/js/apps/documentation/components/Sidebar.tsx
server/sonar-web/src/main/js/apps/documentation/components/__tests__/SearchResults-test.tsx
server/sonar-web/src/main/js/apps/documentation/components/__tests__/__snapshots__/SearchResults-test.tsx.snap