Skip to content

Commit 7150020

Browse files
committed
feat(dependencies): add searchable fields to headline, topic, and source clients
- Added 'title' as a searchable field for headlines - Added 'name' as a searchable field for topics and sources
1 parent fc5a517 commit 7150020

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/src/config/app_dependencies.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,23 @@ class AppDependencies {
9494
modelName: 'headlines',
9595
fromJson: Headline.fromJson,
9696
toJson: (item) => item.toJson(),
97+
searchableFields: ['title'],
9798
logger: Logger('HtDataMongodb<Headline>'),
9899
);
99100
final topicClient = HtDataMongodb<Topic>(
100101
connectionManager: _mongoDbConnectionManager,
101102
modelName: 'topics',
102103
fromJson: Topic.fromJson,
103104
toJson: (item) => item.toJson(),
105+
searchableFields: ['name'],
104106
logger: Logger('HtDataMongodb<Topic>'),
105107
);
106108
final sourceClient = HtDataMongodb<Source>(
107109
connectionManager: _mongoDbConnectionManager,
108110
modelName: 'sources',
109111
fromJson: Source.fromJson,
110112
toJson: (item) => item.toJson(),
113+
searchableFields: ['name'],
111114
logger: Logger('HtDataMongodb<Source>'),
112115
);
113116
final countryClient = HtDataMongodb<Country>(

0 commit comments

Comments
 (0)