N
Nuxt3mo ago
clairepJET

Nuxt Content Search - What are the valid search options.field values?

I have a Nuxt 3 project that uses Nuxt Content, with MD files that have additional properties in the FrontMatter -- namely "team". I'm using searchContent for the first time, and I'm trying to figure out if it's possible to search for team and subtitle but can't seem to get it to work. I don't seem to see additional documentation on the valid options values Here's the relevant snippet to my NuxtConfig - I tried to see if I could access team directly and also tried to access it through 'meta' but again, not sure what the valid options values are
content: {
experimental: {
search: {
options: {
fields: ['title', 'titles', 'meta', 'team'],
storeFields: ['title', 'titles', 'meta', 'team'],
searchOptions: {
prefix: true,
fuzzy: 0.2,
boost: {
title: 4,
content: 2,
titles: 1
}
}
}
},
clientDB: true
}
},
content: {
experimental: {
search: {
options: {
fields: ['title', 'titles', 'meta', 'team'],
storeFields: ['title', 'titles', 'meta', 'team'],
searchOptions: {
prefix: true,
fuzzy: 0.2,
boost: {
title: 4,
content: 2,
titles: 1
}
}
}
},
clientDB: true
}
},
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server