How would a funktion similar to LIKE (and ILIKE) looks like in CouchD开发者_开发百科B?
Not only if I want to search for "foo%" but also for "%foo%" or "%foo%bar%" and so on
I'm presuming you want to have dynamic queries here, but that unfortunately can't be done in a view. If you want a great, full-featured search solution, Lucene will be the way to go.
Alternatively, you could use a _list
function. You would write up a view to do some basic filtering, probably by a type
parameter or something of that nature. Within your list function, you'll have access to the query parameters. With that, you can customize the response of your view depending on the parameters passed.
精彩评论