Skip to content

Commit c9948d2

Browse files
authored
hotfix: update create method to use sfq query array to handle collection change (#625)
Note: this is a temporary solution * Update create method to use sfq query array to handle collection change The create method now expects params.query.sfq as an array of strings and joins them with 'AND' to form the query. * wrap terms with parenthesis --------- Co-authored-by: Daniele Guido <1181642+danieleguido@users.noreply.github.com>
1 parent 3b861a4 commit c9948d2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/services/search-exporter/search-exporter.class.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ export class Service {
3030
this.app = app
3131
}
3232

33-
async create(data: CreateData, params: Params<CreateQuery> & WithUser & { sanitized: CreateQuery }) {
33+
async create(
34+
data: CreateData,
35+
params: Params<CreateQuery> & WithUser & { sanitized: CreateQuery } & { query: { sfq: string[] } }
36+
) {
3437
const client = this.app.get('celeryClient')
3538
if (!client) {
3639
return {}
3740
}
3841

39-
const q = params.sanitized.sq
42+
const q = params.query.sfq.map(term => `(${term})`).join(' AND ')
4043
debug('[create] from solr query:', q, 'filters:', params.sanitized.filters)
4144

4245
const pq = protobuf.searchQuery.serialize({

0 commit comments

Comments
 (0)