开发者

WHERE foo LIKE "%bar%" in CouchDB

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜