On Thu, Jan 22, 2009 at 1:00 PM, Brian Candler <[email protected]> wrote: > On Thu, Jan 22, 2009 at 12:08:39PM -0500, Paul Davis wrote: >> Something you could try: >> >> emit(doc.field_to_search, value); >> emit(string_reverse_function(doc.field_to_search), vaule); >> >> Then you could do something like: >> >> http://127.0.0.1:5984/db_name/_view/ddoc/using_like?startkey="foo"&endkey="foo\u9999" >> http://127.0.0.1:5984/db_name/_view/ddoc/using_like?startkey="oof"&endkey="oof\u9999" >> >> And then intersect the two sets client side. > > I don't think I get this. As far as I can see, one set is values matching > foo%, the other is values matching %foo. > > A string like "abcfoodef" isn't going to appear in either set, is it? >
Oh. Touche. It sounded lots more clever in my head though. XD
