org.fao.geonet.kernel.search
Class DuplicateDocFilter

java.lang.Object
  extended by org.apache.lucene.search.Filter
      extended by org.fao.geonet.kernel.search.DuplicateDocFilter

public class DuplicateDocFilter
extends org.apache.lucene.search.Filter

When there are multiple languages certain queries can match the same "document" in each different language index. This filter allows the first match but none of the later matche.

Author:
jeichar

Constructor Summary
DuplicateDocFilter(org.apache.lucene.search.Query query, int maxResults)
           
 
Method Summary
 org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.AtomicReaderContext context, org.apache.lucene.util.Bits acceptDocs)
           
 org.apache.lucene.search.Query getQuery()
           
 void setQuery(org.apache.lucene.search.Query query)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DuplicateDocFilter

public DuplicateDocFilter(org.apache.lucene.search.Query query,
                          int maxResults)
Method Detail

getQuery

public org.apache.lucene.search.Query getQuery()

setQuery

public void setQuery(org.apache.lucene.search.Query query)

getDocIdSet

public org.apache.lucene.search.DocIdSet getDocIdSet(org.apache.lucene.index.AtomicReaderContext context,
                                                     org.apache.lucene.util.Bits acceptDocs)
                                              throws IOException
Specified by:
getDocIdSet in class org.apache.lucene.search.Filter
Throws:
IOException


Copyright © 2003-2013. All Rights Reserved.