question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lunr indexing 0 files out of 100

See original GitHub issue

Lunr doesn’t index any files out of my docs folder .md files

I have about 98 .md files in my docusaurus site:

> find docs/ -name '*.md' | wc -l
98

When I docusaurus build the site. it shows:

[INFO] [en] Creating an optimized production build...
[...]
docusaurus-lunr-search:: Building search docs and lunr index file
docusaurus-lunr-search:: Start scanning documents in 16 threads
docusaurus-lunr-search:: Indexing time: 454.61ms
docusaurus-lunr-search:: indexed 0 documents out of 100
docusaurus-lunr-search:: writing search-doc.json
docusaurus-lunr-search:: writing search-doc-1644309064310.json
docusaurus-lunr-search:: writing lunr-index.json
docusaurus-lunr-search:: writing lunr-index-1644309064310.json
docusaurus-lunr-search:: End of process

I do have broken links in my Markdown files, could this affect lunr indexing?

[WARNING] Docusaurus found broken links!

I’m using the following versions

@docusaurus/core@2.0.0-beta.15
docusaurus-lunr-search@2.1.15

My configuration in docusaurus.config.js is simply:

// ...
  plugins: [
    [
      'docusaurus-lunr-search', {
      }
    ]
  ],

Any idea what could cause this? Let me know if you need more info to reproduce it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
praveenn77commented, Aug 8, 2022

Release done v2.1.16

2reactions
romainboucommented, Mar 4, 2022

I actually tried again, and the issue seems fixed in the current master with commit 0f83df127f671c478da90d0b993deb2253b38ae3 👍 I got the issue with the v2.1.15. So I guess it will be solved once a new release is done.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Empty index with v2.0.0-alpha5 #252 - olivernn/lunr.js - GitHub
When I do this, index file is created but it is empty ... Not too early to try out v2, in fact, the...
Read more >
olivernn/lunr.js - Gitter
Since indexing in lunr 2.x happens entirely ahead of time (as opposed to 0.x and 1.0 when documents could be added/removed/changed after building...
Read more >
Pre-building Indexes - Lunr.js
This technique is useful with large indexes, or with documents that are largely static, such as with a static website. Serialization. Lunr indexes...
Read more >
Add Search to a Hugo site with Lunr.js and Node.js
This function actually just logs the stringified index out. To get it into a file, we could add await fs.writeFile('./path/to/index.json', ...
Read more >
The easier way to use lunr search with Hugo | Almost Secure
With lunr.js you can add a site search to your Hugo-generated website without any server-side code, and the search index will update ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found