Closed marceloverdijk closed 3 years ago
Can you clarify what you mean by a “unified model”?
Yes, what I mean is I have divided the model with attributes per type now.
As alternative I could use something like:
[
{
"type": "author",
"id": "joanne-rowling",
"name": "Joanne Rowling", // concat firstName + lastName
"countryAlpha2Code": "GB",
"countryName": "Great Britain"
},
{
"type": "publisher",
"id": "bloomsbury",
"name": "Bloomsbury",
"countryAlpha2Code": "GB",
"countryName": "Great Britain"
},
{
"type": "book",
"id": "0-7475-3269-9",
"name": "Harry Potter and the Philosopher's Stone",
"tags": ["Fantasy"]
}
]
and I could use:
keys: [
'name',
'countryAlpha2Code',
'countryName',
'tags'
]
which more-or-less unifies the different models in the index. And I wonder if that would make a difference in performance? PS: I have no performance issue now, but I'm looking for the best setup.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
I would like to use Fuse for searching various "record" types on a website, so not trying to index pages itself.
Let's say we have
Author
,Publisher
andBook
records like:Author
:id
(unique)firstName
lastName
nationality
alpha2Code
name
Publisher
id
(unique)name
country
alpha2Code
name
Book
:isbn
(unique)title
genre[]
I want all of these in the same search index so I was thinking adding them like:
And when indexing set the keys like:
I wonder if this is the best approach to set it up - in terms of performance - , or to make a more "unified" model ? My index will be ~3000 records.
Thanks for your help.