incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex P <>
Subject Re: cdb-lucene question (is there a better place for these?)
Date Tue, 12 Jan 2010 03:25:04 GMT

On Mon, Jan 11, 2010 at 4:59 PM, Markus Jelsma <> wrote:

> Hello Alex,
> The first question that comes to mind is: do you really exceed the
> so-called 2kb URL limit that at least some old version of IE force upon
> you? But on the other hand, do you really expose the complete Lucene query
> to the public? If not, then you can only stumble upon Erlang's limit or
> the limit enforced by your proxy; Apache can handle at least a 8kb URL and
> Nginx maybe even more.

>> have to look into this... i need to filter my search results against a
list of users that are allowed to see it. that user list is passed in as a
giant 'or' clause. each user id + lucene syntax equates to about 42
characters, which gives me a maximum list of roughly 200 users to filter
against assuming an 8kb limit. i may theoretically have more users than
that. (side note - if there's a better way of doing this with couch, i'm all

> Also, using a POST for searches is breaking HTTP's semantics; it would
> make no sense using HTTP POST for retrieval or search operations and
> therefore i for instance would argue against making a fork for something
> that breaks with decent semantics.

it might, but it follows an established couch convention of POSTing a key
array to a view

> Finally, even if you expose your query to the public (and therefore having
> to conform the the limits of the weakest link; IE with about 2kb limit),
> would you really build a search query using more than that many bytes?
i don't, but i don't see a better option at the moment. each document that i
search against has an owner. each query that comes in states that it is
allowed to see data owned by users {u0, u1, ... , uN}. the only two options
i've come up with for doing this inside couch are either the giant OR clause
that i submit, or emiting the full list of users that are allowed to see a
doc (it's a social networking thing, so there's a document owner and a
series of friends that are allowed to see it).

again, suggestions are awelcome.

> Cheers,
> Alex P zei:
> > my current usage of cdb-lucene requires me to pass in fairly long
> > queries, long enough that i think i might hit a url length limit sooner
> > or later. are there  plans to support a keys-style POST operation? it
> > would even be conceivable to submit an object graph rather than a string
> > query, which would hopefully speed the parsing process (translate
> > straight into a lucene query object, rather than parsing the other
> > form).
> >
> > if not, this is something that i'll definitely pursue in a fork.
> >
> > apologies if there is a better place for this question.
> >
> > thanks,
> > alex

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message