We have a system in which access to documents is controlled by a non-trivial authorization system most closely related to ACLs. A user is able to either see all the document's fields, a well-defined subset of those fields, or none of the fields.
I need help figuring out how to get lucene to not search on fields of a document that a user can't see. I have found the Filter class. In order to use this, it seems I need to know the lucene document IDs of the documents that should be visible, and from what I understand document IDs are not fixed so I can't store a link between them and my database rows. I have considered storing my database IDs in a lucene field on each document. What I can't figure out is how to guarantee that all search results are in the set of database IDs that a user can see. I can retrieve that list of IDs; is there a way to have lucene filter on that list? Thanks! -- Brian
