Support For Text Search

Currently Supported Operations:

1) Text search on boolean, number, and strings
2) Text Search on sub fields and arrays
3) Default Search when no fields are provided
4) Pagination via $bookmark operator
5) Faceted Search via $counts and $ranges operators
6) Sort 
7) Use of analyzers

Not Currently Supported:
1) Group By 
2) Sort by location

Examples are in tests folder.

Need more negative tests.

Open Discussion:
If the user doesn't provide any fields, then we use the default field which indexes all values from the fields that were provided during text creation. Hence, if an index has "fields":["age","name"],
then the default field would index both "age" and "name". 
When multiple indexes exist, then each index will have a "default" field. If the user searches without providing a field name, then which index do we choose? Currently we choose the index contains the most fields. 

In general, multiple indexes pose a problem for selection. Right now, we allow different indexes to
index the same set of fields. These indexes, however, could have different options for each field. 
Which index should we choose? Currently, we choose the index created last. 
Don't introspect the return value of UserFun. The return value is {Go, NewAcc} = UserFun(Data, OldAcc). If the value of Go is ok, then you go onto the next row. If its stop or error then you need to return. The standard approach is to wrap in a try/catch and throw. For {stop, Acc} the return should be {ok, Acc}, and for {error, Anything} it should return {error, Anything}.

This isn't very well documented here obviously but just note that its a somewhat consistent pattern throughout CouchDB.