Permalink
Browse files

Add an example of what full-text search does.

  • Loading branch information...
alexandernst committed May 20, 2012
2 parents 820fdf0 + ee6599e commit 6b4f2add4eb822984735071318d8fc3271e55179
Showing with 12 additions and 0 deletions.
  1. +6 −0 dist/backbone.paginator.js
  2. +6 −0 lib/backbone.paginator.js
@@ -238,6 +238,12 @@ Backbone.Paginator = (function ( Backbone, _, $ ) {
// The actual place where the collection is filtered.
// Check setFilter for arguments explicacion.
_filter: function ( models, fields, filter ) {
+
+ // For example, if you had a data model containing cars like { color: '', description: '', hp: '' },
+ // your fields was set to ['color', 'description', 'hp'] and your filter was set
+ // to "Black Mustang 300", the word "Black" will match all the cars that have black color, then
+ // "Mustang" in the description and then the HP in the 'hp' field.
+ // NOTE: "Black Musta 300" will return the same as "Black Mustang 300"
// We accept fields to be a string or an array,
// but if string is passed we need to convert it
@@ -235,6 +235,12 @@ Backbone.Paginator = (function ( Backbone, _, $ ) {
// The actual place where the collection is filtered.
// Check setFilter for arguments explicacion.
_filter: function ( models, fields, filter ) {
+
+ // For example, if you had a data model containing cars like { color: '', description: '', hp: '' },
+ // your fields was set to ['color', 'description', 'hp'] and your filter was set
+ // to "Black Mustang 300", the word "Black" will match all the cars that have black color, then
+ // "Mustang" in the description and then the HP in the 'hp' field.
+ // NOTE: "Black Musta 300" will return the same as "Black Mustang 300"
// We accept fields to be a string or an array,
// but if string is passed we need to convert it

0 comments on commit 6b4f2ad

Please sign in to comment.