ebi-ait / checklist

Template repository for checklists
Apache License 2.0
1 stars 0 forks source link

text search with additional filters ignores other filters #138

Open amnonkhen opened 1 month ago

snathanvj commented 1 week ago

@amnonkhen could you please provide a step to reproduce this, I think this has been fixed already and working correctly now.

snathanvj commented 4 days ago

PR for this: no test cases added yet.

https://github.com/EBIBioSamples/json-schema-store/pull/57

script to update synthetic field(created just for partial text search by combining few other fields )

db.schemas.updateMany( {}, [ { $set: { searchable: { $trim: { input: { $reduce: { input: [ "$accession", "$description", "$title", "$name", "$group" ], initialValue: "", in: { $concat: [ "$$value", { $cond: [{ $eq: ["$$value", ""] }, "", " "] }, { $ifNull: ["$$this", ""] } ] } } } } } } } ] )

amnonkhen commented 2 days ago

Link on how to add a db migration script that will update those values upon startup. There is a spring feature for it.

See how it's done in HCA

More docs here or here