Fix search highlighting
This commit is contained in:
@@ -184,8 +184,8 @@ Future<List<Note>> searchNotes(String query) async {
|
||||
limit: 10,
|
||||
attributesToHighlight: ['content'],
|
||||
showRankingScore: true,
|
||||
highlightPreTag: '<b>',
|
||||
highlightPostTag: '</b>',
|
||||
highlightPreTag: '<highlight>',
|
||||
highlightPostTag: '</highlight>',
|
||||
);
|
||||
final response = await http.post(
|
||||
Uri.parse('$endpoint/indexes/$noteIndex/search'),
|
||||
@@ -201,7 +201,8 @@ Future<List<Note>> searchNotes(String query) async {
|
||||
(hit) => Note(
|
||||
id: hit['id'] as String,
|
||||
epochTime: hit['date'] as int,
|
||||
content: hit['_formatted']['content'] as String,
|
||||
content: hit['content'] as String,
|
||||
snippet: hit['_formatted']['content'] as String,
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
|
Reference in New Issue
Block a user