couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filipe David Manana <fdman...@apache.org>
Subject Re: CouchDB key that always matches
Date Mon, 17 Jan 2011 12:12:01 GMT
I think you can do it querying with a startkey like null and an endkey
like "zzzzzzz".
See the view collation page on the wiki:
http://wiki.apache.org/couchdb/View_collation

On Mon, Jan 17, 2011 at 2:09 AM, Tristan Sloughter
<kungfooguru@gmail.com> wrote:
> Well, this is really the extent of it. Its a little more complex than what I
> give here (the actual key returned has 5 elements to match on). But I want
> exact matches of those values, instead of ranked results from a full-text
> query.
>
> Of course, its if not possible to do something like this I guess I have no
> other option.
>
> The use case is a package manager that stores both generic and os/arch
> specific packages. So when asking for packages for an os/arch I want it to
> also gather the generic packages that would have those 2 values be * or
> "any" or something.
>
> Thanks,
> Tristan
>
> On Sun, Jan 16, 2011 at 8:06 PM, Patrick Barnes <mrtrick@gmail.com> wrote:
>
>> Tristan, if you are looking to run more complex queries (particularly
>> anything to do with wildcards) you should really look at couchdb-lucene.
>>
>> http://github.com/rnewson/couchdb-lucene
>>
>> -Patrick
>>
>>
>> On 17/01/2011 1:01 PM, Tristan Sloughter wrote:
>>
>>> I'm looking to query my Couch database in such a way that some of the
>>> fields
>>> in a document can be wildcards that match any key request. Example:
>>>
>>> function(doc) { emit(doc.some_field, doc); }
>>>
>>> ?key=100
>>>
>>> would match both the document with some_field of 100 and of some_field
>>> with
>>> the value *.
>>>
>>> Is this possible? Is there a hack way I can resolve it?
>>>
>>> Thanks,
>>>
>>> Tristan
>>>
>>>
>



-- 
Filipe David Manana,
fdmanana@gmail.com, fdmanana@apache.org

"Reasonable men adapt themselves to the world.
 Unreasonable men adapt the world to themselves.
 That's why all progress depends on unreasonable men."

Mime
View raw message