lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <>
Subject Re: Per User filtering of public/common documents
Date Mon, 21 May 2012 09:57:35 GMT
Certainly lots of questions, and I can't answer most of them, but a
couple of comments/opinions.

Collecting all docs will potentially use a lot of memory but isn't
necessarily excessively slow.  It's generally only doing something
like reading field values for all docs that can be prohibitively slow.

Adding the username to docs and querying/filtering on that sounds a
good idea.  If that data doesn't change much you can use a cached
filter - that is generally very fast.  See CachingWrapperFilter.


On Fri, May 18, 2012 at 10:55 PM, Apostolis Xekoukoulotakis
<> wrote:
> Let us say that we have N users that care about K of the M common documents
> that exist in a database. What is the best way to filter the documents?
> The results will then be sorted per properties of the document,properties
> that are stored in a database.(multidimensional score/sorting). Then the
> top D^(number of properties) results can be extracted to be shown in the
> users screen. For this to work, all hits need to collected from Lucene.
> (One of the properties is ofcourse relevance which is extracted from lucene)
> (The other 'properties/ranking' of the documents will change a lot despite
> the document remaining static.)
> What is the fastest way to do what I want? Can you explain your answer on
> the algorithmic complexity of  the internals of lucene so as that I
> understand lucene?
> I have heard that collecting all documents is time consuming. Why is that?
> Arent all documents that match the terms of the query sorted by relevance
> despite the fact that only n of them are selected?
> Some random thoughts/solutions:
> In a new field, add to each document the name of the users that want to see
> it, then pass the name in the query.
> Create and store a bitmap per user.
> problem:the bitmap will change a lot since it depends on the properties
> that change dynamically.
> Too many questions, sorry for that.
> --
> Sincerely yours,
>     Apostolis Xekoukoulotakis

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message