Reputation: 345
How would a funktion similar to LIKE (and ILIKE) looks like in CouchDB?
Not only if I want to search for "foo%" but also for "%foo%" or "%foo%bar%" and so on
Upvotes: 3
Views: 1199
Reputation: 28429
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.
Upvotes: 2