lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: folder path prefix filtering
Date Tue, 05 Aug 2008 13:31:37 GMT
This situation is pretty much the kind of thing PrefixFilters
were written for, so I'd certainly try those first, with or
without caching. I was surprised at how fast filters
get constructed, so I'd just try it and take a few measurements.

Best
Erick

On Tue, Aug 5, 2008 at 3:40 AM, Nico Krijnen <nico@dutchsoftware.com> wrote:

> Hello,
>
> Need some help with prefix filtering...
> We ran into the max clause count problem with our usage of the wildcard
> query. Essentially what we are trying to do is:
>
> One of the fields in our index contains a 'path' representing a file system
> location. For example:
>
> /folder A/subfolder/document 1.pdf
> /folder B/image 1.jpg
> /folder B/image 2.jpg
> /folder B2/image 3.jpg
> /folder C/image 4.jpg
>
> We have a security layer in our application that filters results based on
> the users permissions. These permissions (VIEW, EDIT, ...) can be set on
> 'folder paths'. To filter the results we build a bool query with a wildcard
> (or prefix) query for each folder for which the user has VIEW permissions,
> for example:
>
> /folder A/subfolder/*
> /folder B/*
> /folder B2/*
>
> This does exactly what we want to, but because a wildcard query is
> rewritten to term queries it fails when there are more then 1024 documents
> below a folder (max clause count of rewritten bool query). After all, each
> document has a different (untokenized) term value for the 'path' field.
>
> After searching the web we found some alternative methods, for example by
> using a PrefixFilter wrapped in a CachingWrapperFilter instead of a query.
> Before we start implementing I'd like to check if anyone here may have some
> more experience with queries like this or may have a better suggestion on
> how to approach this?
>
> Kind regards,
> Nico Krijnen
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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