lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jake Mannix" <jake.man...@gmail.com>
Subject Re: Security filtering from external DB
Date Tue, 04 Mar 2008 03:33:50 GMT
Gabriel,
  You can make this search much more efficient as follows: say that you have
a method

public BooleanQuery createQuery(Collection<String> allowedUUIDs);

  that works as you describe.  Then you can easily create a useful reusable
filter as follows:

  Filter filter = new CachingWrapperFilter(new
QueryFilter(createQuery(uuidCollection)));

  this filter will cache BitSets keyed on IndexReader instances, so hang
onto it and use it for
the entire time your uuidCollection doesn't change.

   Hope this helps.

  -jake

On Wed, Feb 27, 2008 at 2:48 AM, Gabriel Landais <landais@codelutin.com>
wrote:

> h t a écrit :
> > I guess you can implement createBitSet() more effciently by using
> > Filer,but not BooleanQuery
> Hi,
>  thanks for advice, but did you mean Filter or Filer? And even if I
> should use a Filter, I don't really understand how to replace the
> Boolean query :(
>  The boolean query is already very efficient, so if it can be better,
> it's would be great!
> Regards,
>  Gabriel
>
> ---------------------------------------------------------------------
> 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