itemsapi / itemsjs

Extremely fast faceted search engine in JavaScript - lightweight, flexible, and simple to use

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configurable `id` property on full-text search: Lunr2 integration

Letrab opened this issue · comments

As documented in https://github.com/itemsapi/itemsjs/blob/master/docs/lunr2-integration.md it is possible to use Lunr2 for full-text searching.

I want to try to use this, because I need nested/deep object search (which is possible via the extractor of a field https://lunrjs.com/docs/lunr.Builder.html#field )

But, my data set has no id property, but e.g. a unique property uuid. So it would be nice to make this property configurable in order to be more flexible on this.

It's done. More details in PR tests or integration examples in docs.