title: meteor: searching data in collection
body: <p>I have created <code>search</code> code, but the values cannot display. Can anyone help me?</p>
  
  <p>This my code:</p>
  
  <pre><code>&lt;template name="search"&gt;
    &lt;form &gt;
      &lt;input type="text"  id="categories" /&gt;
      &lt;button&gt;Search&lt;/button&gt;
    &lt;/form&gt;
    &lt;hr/&gt;
    &lt;h3&gt;&lt;/h3&gt;
    &lt;ol&gt;
      {{#each profil}}
        &lt;li&gt;{{brand}}&lt;/li&gt;
      {{/each}}
    &lt;/ol&gt;
  Template.search.events({
      "submit ": function (e) {
        e.preventDefault();
        Session.set("categories", $("#categories").val());
      }
    });
  
    Template.search.helpers({
      profil: function() {
        return Profil.find({
            categories: Session.get('categories'),
          });
      }
  });
  </code></pre>
  
  <p>I'm not sure how to code in publish (server). </p>