org.silverpeas.search.searchEngine.model
Class WAIndexSearcher

java.lang.Object
  extended by org.silverpeas.search.searchEngine.model.WAIndexSearcher

public class WAIndexSearcher
extends Object

The WAIndexSearcher class implements search over all the WebActiv's index. A WAIndexSearcher manages a set of cached lucene IndexSearcher.


Field Summary
static org.apache.lucene.queryParser.QueryParser.Operator defaultOperand
           
static int maxNumberResult
          indicates the number maximum of results returned by the search
 
Constructor Summary
WAIndexSearcher()
          The no parameters constructor retrieves all the needed data from the IndexEngine.properties file.
 
Method Summary
static int getFactorFromProperties(String propertyName, int defaultValue)
          Get the primary factor from the IndexEngine.properties file.
 Set<String> getIndexPathSet(Set<SpaceComponentPair> spaceComponentPairSet)
          Build the set of all the path to the directories index corresponding the given (space, component) pairs.
protected  org.apache.lucene.search.TermRangeQuery getRangeQueryOnCreationDate(QueryDescription query)
           
protected  org.apache.lucene.search.TermRangeQuery getRangeQueryOnLastUpdateDate(QueryDescription query)
           
protected  org.apache.lucene.search.TermQuery getTermQueryOnAuthor(QueryDescription query)
           
protected  org.apache.lucene.search.PrefixQuery getTermQueryOnFolder(QueryDescription query)
           
 MatchingIndexEntry[] search(QueryDescription query)
          Search the documents of the given component's set.
 MatchingIndexEntry search(String component, String objectId, String objectType)
          Searches the Lucene index for a specific object, by giving the PK of the index entry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultOperand

public static org.apache.lucene.queryParser.QueryParser.Operator defaultOperand

maxNumberResult

public static int maxNumberResult
indicates the number maximum of results returned by the search

Constructor Detail

WAIndexSearcher

public WAIndexSearcher()
The no parameters constructor retrieves all the needed data from the IndexEngine.properties file.

Method Detail

getFactorFromProperties

public static int getFactorFromProperties(String propertyName,
                                          int defaultValue)
Get the primary factor from the IndexEngine.properties file.

Parameters:
propertyName -
defaultValue -
Returns:

search

public MatchingIndexEntry search(String component,
                                 String objectId,
                                 String objectType)
Searches the Lucene index for a specific object, by giving the PK of the index entry

Parameters:
component -
objectId -
objectType -
Returns:
MatchingIndexEntry wrapping the result, else null

search

public MatchingIndexEntry[] search(QueryDescription query)
                            throws ParseException
Search the documents of the given component's set. All entries found whose startDate is not reached or whose endDate is passed are pruned from the results set.

Parameters:
query -
Returns:
Throws:
ParseException

getIndexPathSet

public Set<String> getIndexPathSet(Set<SpaceComponentPair> spaceComponentPairSet)
Build the set of all the path to the directories index corresponding the given (space, component) pairs.


getRangeQueryOnCreationDate

protected org.apache.lucene.search.TermRangeQuery getRangeQueryOnCreationDate(QueryDescription query)

getRangeQueryOnLastUpdateDate

protected org.apache.lucene.search.TermRangeQuery getRangeQueryOnLastUpdateDate(QueryDescription query)

getTermQueryOnAuthor

protected org.apache.lucene.search.TermQuery getTermQueryOnAuthor(QueryDescription query)

getTermQueryOnFolder

protected org.apache.lucene.search.PrefixQuery getTermQueryOnFolder(QueryDescription query)


Copyright © 2016 Silverpeas. All Rights Reserved.