couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tristan Sloughter <tristan.slough...@gmail.com>
Subject Re: CouchDB key that always matches
Date Mon, 17 Jan 2011 16:34:48 GMT
I think what would allow me to do this with one query would be:

https://issues.apache.org/jira/browse/COUCHDB-523

So I guess it won't be possible anytime soon.

Thanks,
Tristan

On Mon, Jan 17, 2011 at 9:27 AM, Tristan Sloughter <
tristan.sloughter@gmail.com> wrote:

> Sadly that won't work. Since that would pick up not only the generic
> (wildcard) keys but also ones that simply are between whatever represents
> that and the passed in key to match on.
>
> Tristan
>
>
> On Mon, Jan 17, 2011 at 6:12 AM, Filipe David Manana <fdmanana@apache.org>wrote:
>
>> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message