org.fao.geonet.kernel.search
Class LuceneUtils

java.lang.Object
  extended by org.fao.geonet.kernel.search.LuceneUtils

public class LuceneUtils
extends java.lang.Object

Utilities for the Lucene library.


Constructor Summary
LuceneUtils()
           
 
Method Summary
static org.apache.lucene.search.BooleanClause.Occur convertRequiredAndProhibitedToOccur(boolean required, boolean prohibited)
          As of Lucene 1.9, the use of BooleanQuery.add(Query, boolean, boolean) was deprecated and replaced by BooleanQuery.add(Query, BooleanClause.Occur).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneUtils

public LuceneUtils()
Method Detail

convertRequiredAndProhibitedToOccur

public static org.apache.lucene.search.BooleanClause.Occur convertRequiredAndProhibitedToOccur(boolean required,
                                                                                               boolean prohibited)
As of Lucene 1.9, the use of BooleanQuery.add(Query, boolean, boolean) was deprecated and replaced by BooleanQuery.add(Query, BooleanClause.Occur). This utility method converts the old pair of booleans to the corresponding BooleanClause.Occur value.

Parameters:
required -
prohibited -
Returns:
BooleanClause.Occur