matteodem / meteor-easy-search

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

Search fields on an object #593

Closed isAlmogK closed 7 years ago

isAlmogK commented 7 years ago

I wanted to know if it's possible to have easy search use an object for the field search.

I have the following

profileFields: {
    name: "Lucy Lloyd",
    gender: "female",
    iGenLocation: "Melbourne",
    industry: "Education",
    interests: [
      "Dog Lover",
      "Extrovert"
    ],
    role: "mentee",
    contactDays: "Weekends"
  },

and when I set the fields to

  fields: ['profileFields']

It does not work but the following does work

  fields: ['profileFields.name', 'profileFields.bio']
matteodem commented 7 years ago

There's multiple approaches to solve this. Either you save the data differently, provide a selector configuration or use ElasticSearch, see http://matteodem.github.io/meteor-easy-search/docs/recipes/