Skip to content

Conversation

@chasenlehara
Copy link
Member

This PR rewrites how we query the Lunr index to get search results. I’ve added tests for a few scenarios—if you test search and find that the results aren’t great for a specific term, I can add a new test case for it and fix the results.

Fixes #290

@chasenlehara chasenlehara requested a review from imaustink June 2, 2017 23:15
"styles": "rm -rf node_modules/bit-docs-generate-html/site/static && node make-example.js -f",
"test": "npm run testee",
"styles": "rm -rf node_modules/bit-docs-generate-html/site/static && npm start",
"test": "npm start && npm run testee",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to generate the site before running the tests so it always works.

var searchIndexVersionKey = this.formatLocalStorageKey(this.searchIndexVersionLocalStorageKey);
var index = this.getLocalStorageItem(searchIndexKey);
var indexVersion = this.getLocalStorageItem(searchIndexVersionKey);
var currentIndexVersion = 1;// Bump this whenever the index code is changed
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See this commit for more details: 0d346e5

Copy link
Contributor

@imaustink imaustink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@imaustink imaustink merged commit 2d21cf9 into master Jun 2, 2017
@imaustink imaustink deleted the 290-search-result-ordering branch June 2, 2017 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the search result ordering

3 participants