matteodem / meteor-easy-search

Easy-to-use search for Meteor with Blaze Components
MIT License
438 stars 68 forks source link

Tranform modify UI but not what easysearch searchs #542

Closed ilan-schemoul closed 7 years ago

ilan-schemoul commented 7 years ago

Hello, lets say I have :

worksheets [{ _id: '123', title: 'Super title', content: 'test' }]
user.worksheets [{ id: '123', content: 'its perso' }]

I want to use content of user.worksheets if there's an id which match with a worksheet element. It's actually working :

      transform(doc) {
        const userWorkeet = findUserWorksheet(doc._id);
        if (userWorkeet) {
          doc.content = userWorkeet;
          doc.isModified = true;
        }
        return doc;
      },

My app shows me like I want title: 'Super title', content: 'its perso' Now let's say that my fields are fields: ['title', 'category', 'content'] If I do search 'test' I will have 'Super title' but if I search for 'its perso' nothing show up. I want a kind of transform option which is logical with what people search.

ilan-schemoul commented 7 years ago

@matteodem did I was clear enough ?

ilan-schemoul commented 7 years ago

Anyway I'll create my own search engine, thanks.