Skip to content

TeamGrid/meteor-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

teamgrid:search

Meteor package that provides a simple API for implementing a fulltext-search.

Installation


    meteor add teamgrid:search

Usage

On server

TeamSearch.define
  uniqueSearchName:
    threshold: 3
    collections:
      posts:
        indexFields: ['name']
        query:
          archived: $ne: true
        query: (searchValue, data) ->
          _.extend this, authorId: data.authorId
        options:
          fields:
            name: 1
            limit: 10

On client

{{#TeamSearch name='uniqueSearchName' searchString=reactiveSearchString}}
  {{#each searchItems}}
    {{name}}
  {{else}}
    no results
  {{/each}}
{{else}}
  loading...
{{/TeamSearch}}

About

fulltext-search over multiple collections

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published