Closed corneliugaina closed 1 year ago
Any news on this issue.
Hey @corneliugaina and @nashvinxtn,
If you would like to index and/or store all fields, you can simply omit the option. If you don't specify a list of index or store keys, the lists will default to all keys.
Here is an example:
// gatsby-config.js
module.exports = {
plugins: [
{
resolve: 'gatsby-plugin-local-search',
options: {
name: 'pages',
engine: 'flexsearch',
query: `
{
# Your query
}
`,
normalizer: ({ data }) => {
// Your normalizer
}
},
},
],
}
Because the index
and store
options are not included, each of them will default to all of your keys. You can also choose to include just index
or just store
, or both.
In the gatsby-config example, it says for index and store there's an 'default' option to expose all fields. However it's not self-explanatory and I tried several options whitout success.
Anybody can explain how I can expose all the properties of normalizer without writing what fields should be in index and store ?