Save This Page
Home » lucene-2.3.2-src » org.apache » lucene » search » [javadoc | source]
org.apache.lucene.search
public class: DuplicateFilter [javadoc | source]
java.lang.Object
   org.apache.lucene.search.Filter
      org.apache.lucene.search.DuplicateFilter

All Implemented Interfaces:
    Serializable

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Field Summary
 String fieldName     
 int keepMode    KeepMode determines which document id to consider as the master, all others being identified as duplicates. Selecting the "first occurrence" can potentially save on IO. 
public static final  int KM_USE_FIRST_OCCURRENCE     
public static final  int KM_USE_LAST_OCCURRENCE     
 int processingMode    "Full" processing mode starts by setting all bits to false and only setting bits for documents that contain the given field and are identified as none-duplicates. "Fast" processing sets all bits to true then unsets all duplicate docs found for the given field. This approach avoids the need to read TermDocs for terms that are seen to have a document frequency of exactly "1" (i.e. no duplicates). While a potentially faster approach , the downside is that bitsets produced will include bits set for documents that do not actually contain the field given. 
public static final  int PM_FULL_VALIDATION     
public static final  int PM_FAST_INVALIDATION     
Constructor:
 public DuplicateFilter(String fieldName) 
 public DuplicateFilter(String fieldName,
    int keepMode,
    int processingMode) 
Method from org.apache.lucene.search.DuplicateFilter Summary:
bits,   equals,   getFieldName,   getKeepMode,   getProcessingMode,   hashCode,   main,   setFieldName,   setKeepMode,   setProcessingMode
Methods from org.apache.lucene.search.Filter:
bits
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.search.DuplicateFilter Detail:
 public BitSet bits(IndexReader reader) throws IOException 
 public boolean equals(Object obj) 
 public String getFieldName() 
 public int getKeepMode() 
 public int getProcessingMode() 
 public int hashCode() 
 public static  void main(String[] args) throws Exception 
 public  void setFieldName(String fieldName) 
 public  void setKeepMode(int keepMode) 
 public  void setProcessingMode(int processingMode)