search
search copied to clipboard
document schema mapping and provide examples of different names
$index = new Index('blog', [
'title' => new Field\TextField('title', sortable: true),
'tags' => new Field\TextField('tags', multiple: true, filterable: true),
'internalNote' => new Field\TextField('internalNote', searchable: false),
]);
In the above and all the examples I can find on the website, the key and the field name are the same. I assume there's map that ways "when you see this key in the document being indexed, store it as a key of this type".
But I'm not sure which is which.
$index = new Index('imdb', [
'movie_name' => new Field\TextField('title', sortable: true),
'Genres' => new Field\TextField('genre', multiple: true, filterable: true),
'Directory Notes' => new Field\TextField('internalNote', searchable: false),
]);
As some of my data comes from CSV files with first columns that are more labels, I'm curious about how the mapping it done.