[Xapian-discuss] Term Prefixes Question

Richard Boulton richard at lemurconsulting.com
Tue Sep 18 13:43:34 BST 2007


Andreas Marienborg wrote:
> 
> On Sep 18, 2007, at 12:59 AM, Keith Swallow wrote:
> 
>> Greetings All,
>>
>> My team and I are implementing a project where some parts of an 
>> indexed document are private and others are public. We had assumed 
>> that prefixing the private terms with XPRIV would filter out those 
>> results from public searches. In other words, only searches for XPRIV 
>> terms woud return XPRIV results. Is this the case? If not, do you have 
>> any tips on how to implement this concept or one like it?
>>
> 
> I think you need to have a term on public documents as well, and take 
> measures to make sure that is always in your query. Or you could write a 
> MatchDecider that decides if the query should see private documents or 
> not I suppose.

I don't think this is what Keith is trying to do - if I understand him, 
he has documents which have a private part, not some documents which are 
entirely private.

The scheme he outlines could work - as long as he ensures that the 
public searchers cannot generate XPRIV terms.  If he's using the 
queryparser, and doesn't add a prefix which generates XPRIV terms, I 
think this should be okay (but I'm not sure I'd want to guarantee the 
security of sensitive information this way - it feels a little fragile, 
somehow).

-- 
Richard



More information about the Xapian-discuss mailing list