Node.js Search Example #712
BeebBenjamin
started this conversation in
Show and tell
Replies: 1 comment
-
Nice! Love this, thanks for sharing 😄 I'll convert this over to a discussion if that's alright! Just so it can exist as more evergreen content than an issue 🙂 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After wrestling with a React component approach to running a search on a Pagefind index, I came up with an alternative method for interfacing with the Search API whilst we wait for someone to tackle a full Node.js implementation of the Search API.
You can run the Search API as an embedded script on a small HTML page and use a simple Node.js express API to pass in the query params via a headerless browser i.e. puppeteer and parse the JSON.
This approach also allows you to catch the JSON response from Pagefind and format it to something else e.g. IIIF content search. I've also been making use of the Node.js indexing API to create custom content from linked data files e.g. json. I'm really impressed with it's power to provide full text searching to a static IIIF implementation.
Just wanted to document it here.
I would be interested to know what other people have done with Node.js.
Beta Was this translation helpful? Give feedback.
All reactions