LeanKit-Labs/riaktive — pull request #6 by JohnDMathis (2014-05-16 18:02:54+00:00)
Title: Adds option to retrieve available query stats

Adds a third, optional, parameter 'includeStats'. When set to true, the search returns an object containing various stats from the query, instead of just the results.
```
index.search( { lastname:smi* }, { start: 0, rows: 3 } , true)
might return:
{
total:2750,
maxScore:0.78,
start:0,
qTime: 6, // milliseconds
docs: [
{ firstname: 'John', lastname: 'Smith' },
{ firstname: 'Sarah', lastname: 'Smitherson' },
{ firstname: 'Bob', lastname: 'Sminerman' }
]
}