[Xapian-discuss] Term Prefixes Question

Andreas Marienborg andreas at startsiden.no
Tue Sep 18 06:11:20 BST 2007


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.

By default a boolean term not being in the query does not invalidate  
the document. (Its presence in a query mandatories it in the  
documents, but not the opposite afaik)

- andreas




More information about the Xapian-discuss mailing list