Thanks for helps! The use case is that there is a file to which different users have different accessment, if only for filtering I can create one field, like status_field, with value like
user1_important user2_important user3_unimportant ... then using a filter to get all files which is important to user1, like status_field:user1_important But tough part is that we may need to sort files according to such flag, for each user (I should have mentioned in last mail). My solution is to add many fields to file document, like user1_status, user2_status, user3_status // value can be important or unimportant then I can sort files according to each user's accessment. My concern is that with too many fields it would not scale well ? Best regards, Lisheng On Sat, Aug 9, 2014 at 6:18 AM, Toke Eskildsen <t...@statsbiblioteket.dk> wrote: > Lisheng Zhang [lz0522...@gmail.com] wrote: > > In our application there are many complicated filter conditions, very > often > > those conditions are special to each user (like whether or not a doc is > > important or already read by a user ..), two possible solutions to > > implement those filters in lucene: > > > 1/ create many fields > > 2/ create many collections (for each user, for example) > > 3) Define a few fields or even just a single field where users can provide > their special tags. > > misc_field:important > misc_field:read > misc_field:personal_letters > misc_field:todo > misc_field:very_important > > Chances are that there will be a lot of overlap of terms between the users > (if not, please describe in more detail what the user-specific things are), > so that the filter caches can be re-used between them. > > - Toke Eskildsen >