Skip to content

Commit e98fc86

Browse files
authored
update doc and fix border case (acseo#122)
1 parent c5fa2e2 commit e98fc86

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ acseo_typesense:
6969
title:
7070
name: title
7171
type: string
72+
description:
73+
name: title
74+
type: description
7275
author:
7376
name: author
7477
type: object # Object conversion with __toString()
@@ -89,7 +92,15 @@ acseo_typesense:
8992
type: string
9093
optional: true
9194
entity_attribute: ACSEO\Service\BookConverter::getCoverImageURL # use a service converter instead of an attribute
92-
95+
embeddings: # Since Typesense 0.25, you can generate Embeddings on the fly
96+
name: embeddings # and retrieve your documents using an vectorial search
97+
type: float[] # more info : https://typesense.org/docs/27.0/api/vector-search.html
98+
embed:
99+
from:
100+
- title
101+
- description
102+
model_config:
103+
model_name: ts/e5-small
93104
default_sorting_field: sortable_id # Default sorting field. Must be int32 or float
94105
symbols_to_index: ['+'] # Optional - You can add + to this list to make the word c++ indexable verbatim.
95106
users:

src/DependencyInjection/ACSEOTypesenseExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ private function loadCollections(array $collections, ContainerBuilder $container
116116
$config['fields']['id'] = [
117117
'name' => 'entity_id',
118118
'type' => 'primary',
119+
'entity_attribute' => 'id'
119120
];
120121
}
121122

0 commit comments

Comments
 (0)