@ekodb/ekodb-client 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +179 -12
- package/dist/client.js +256 -31
- package/dist/client.test.d.ts +7 -0
- package/dist/client.test.js +702 -0
- package/dist/search.d.ts +12 -0
- package/dist/search.js +14 -0
- package/package.json +1 -1
- package/src/client.test.ts +961 -0
- package/src/client.ts +366 -41
- package/src/search.ts +22 -0
package/dist/search.d.ts
CHANGED
|
@@ -48,6 +48,10 @@ export interface SearchQuery {
|
|
|
48
48
|
text_weight?: number;
|
|
49
49
|
/** Weight for vector search (0.0-1.0) */
|
|
50
50
|
vector_weight?: number;
|
|
51
|
+
/** Only return these fields (plus 'id') */
|
|
52
|
+
select_fields?: string[];
|
|
53
|
+
/** Exclude these fields from results */
|
|
54
|
+
exclude_fields?: string[];
|
|
51
55
|
}
|
|
52
56
|
/**
|
|
53
57
|
* Search result with score and matched fields
|
|
@@ -165,6 +169,14 @@ export declare class SearchQueryBuilder {
|
|
|
165
169
|
* Set maximum number of results to return
|
|
166
170
|
*/
|
|
167
171
|
limit(limit: number): this;
|
|
172
|
+
/**
|
|
173
|
+
* Select specific fields to return
|
|
174
|
+
*/
|
|
175
|
+
selectFields(fields: string[]): this;
|
|
176
|
+
/**
|
|
177
|
+
* Exclude specific fields from results
|
|
178
|
+
*/
|
|
179
|
+
excludeFields(fields: string[]): this;
|
|
168
180
|
/**
|
|
169
181
|
* Build the final SearchQuery object
|
|
170
182
|
*/
|
package/dist/search.js
CHANGED
|
@@ -162,6 +162,20 @@ class SearchQueryBuilder {
|
|
|
162
162
|
this.query.limit = limit;
|
|
163
163
|
return this;
|
|
164
164
|
}
|
|
165
|
+
/**
|
|
166
|
+
* Select specific fields to return
|
|
167
|
+
*/
|
|
168
|
+
selectFields(fields) {
|
|
169
|
+
this.query.select_fields = fields;
|
|
170
|
+
return this;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Exclude specific fields from results
|
|
174
|
+
*/
|
|
175
|
+
excludeFields(fields) {
|
|
176
|
+
this.query.exclude_fields = fields;
|
|
177
|
+
return this;
|
|
178
|
+
}
|
|
165
179
|
/**
|
|
166
180
|
* Build the final SearchQuery object
|
|
167
181
|
*/
|