lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antony Bowesman <>
Subject Re: Per user data store
Date Tue, 05 Aug 2008 23:22:09 GMT
Ganesh - yahoo wrote:
> Hello all,
> Documents coressponding to multiple users are to be indexed. Each user is
> going to search only his documents. Only Administrator could search all users
> data.
> Is it good to have one database for each User or to have only one database
> for all Users? Which will be better?

I created a hybrid approach that supported 1..n databases based on a hash of the 
user's user Id.  This was to allow for the situation where a single database 
would not scale - at the time there was not good information about Lucene's 
performance with large data sets.

In practice, we are now using a single database with data for all users.  There 
is an 'ownerId' field with the unique user Id in every document.

 > My opinion is to have one database for all users and to have field
 > 'Username'. Using this field data will get filtered out and the search
 > results will be served to the User. In this approach, whether Username should
 > be part of boolean query or TermFilter will be the better approach?

The ownerId is used as a cached filter rather than always added to the query, so 
that only that user's documents influence the score.  If it is part of the 
query, the complete document set for other users will influence the hits for 
this user.


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

View raw message