Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stopword filter from Lunr index generation in middleman-search. #41

Merged

Conversation

lewisnyman
Copy link
Contributor

After some testing with registers I found that #38 was only half a fix.
alphagov/registers-tech-docs#109. As the lunr index is pre-generated by middleman-search, we also need to remove the stopwordfilter there to return useful results for get.

I've added this config option in the alphagov fork. See: alphagov/middleman-search#1

@MatMoore
Copy link
Contributor

How come in #38 you replace the stopword filter, but here it's removed entirely? Shouldn't it be the same when indexing and searching?

@lewisnyman
Copy link
Contributor Author

We could do that here, and it would save us a few bytes when loading the index, but the effect is the same. I didn't want to add a list of stop words to maintain in two different file.

The other option would be to move the list of stop words into project config and then insert it into the JS file by processing it with Middleman. That's probably the best solution long-term, but it doesn't feel like something we have time for before this project ends.

@jonathanglassman jonathanglassman merged commit 738fe6f into alphagov:master Aug 1, 2018
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.

3 participants