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

Get search working with lunr.js plugin. #68

Merged
merged 1 commit into from
Mar 12, 2013
Merged

Get search working with lunr.js plugin. #68

merged 1 commit into from
Mar 12, 2013

Conversation

slashdotdash
Copy link

Only a couple of tweaks needed to get search working.

Unfortunately it ran very slowly, due to the search index json file weighing in at 1.4MB. The search page took a while to initially load and searching was also slow.

cboettig added a commit that referenced this pull request Mar 12, 2013
Get search working with lunr.js plugin.
@cboettig cboettig merged commit dfbc264 into cboettig:site-search Mar 12, 2013
@cboettig
Copy link
Owner

Thanks again for working through this. Impressive bit of work. Nice to have a functional implementation in any event.

If nothing else, this does highlight the strength of Marran's stemming approach (currently implemented in my search bar) which is crazy fast by comparison: http://www.marran.com/tech/jquery-full-text-indexing-on-jekyll/. Unfortunately, the search itself using Marran's is pretty crappy, since it sorts only by number of occurrences and doesn't even index the title or tag text at all. Ideally it would both index and weight these values. It would still be impossible to search for whole phrases, but at least the results might be a little better. It's weird to put in almost the exact the title of a post and not even find the post among the results. Even google site search does better, and your algorithm nails this. (e.g. search for my "data management plan" on the site).

Well well, thanks again for a cool plugin and all the help. For the time being I think I will include this as a separate search page with a note, and maybe think about hacking some revisions into Marran's code to at least pull in and up-weight title text.

@slashdotdash
Copy link
Author

One future enhancement to the search plugin that I'm considering is to exclude stop words from the index. Should be straightforward enough and hopefully would reduce the file size by a significant amount.

slashdotdash/jekyll-lunr-js-search#2

@slashdotdash slashdotdash deleted the site-search branch March 13, 2013 09:07
@cboettig
Copy link
Owner

Cool, that's brilliant. I don't suppose that it would have much of a
negative impact on the ability to search for phrases?

On Wed, Mar 13, 2013 at 2:07 AM, Ben Smith notifications@github.com wrote:

One future enhancement to the search plugin that I'm considering is to
exclude stop words from the index. Should be straightforward enough and
hopefully would reduce the file size by a significant amount.

slashdotdash/jekyll-lunr-js-search#2slashdotdash/jekyll-lunr-js-search#2


Reply to this email directly or view it on GitHubhttps://github.com//pull/68#issuecomment-14830851
.

Carl Boettiger
UC Santa Cruz
http://www.carlboettiger.info/

@cboettig cboettig mentioned this pull request Mar 26, 2013
cboettig added a commit that referenced this pull request Aug 14, 2017
Get search working with lunr.js plugin.
cboettig added a commit that referenced this pull request Aug 20, 2017
Get search working with lunr.js plugin.
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.

None yet

2 participants