com.atlassian.confluence.search.contentnames.lucene
Class DefaultResultConverter

java.lang.Object
  extended by com.atlassian.confluence.search.contentnames.lucene.DefaultResultConverter
All Implemented Interfaces:
ResultConverter

public class DefaultResultConverter
extends Object
implements ResultConverter


Constructor Summary
DefaultResultConverter(com.atlassian.bonnie.ILuceneConnection luceneConnection)
           
 
Method Summary
 List<SearchResult> asList(org.apache.lucene.search.TopDocCollector results)
          Converts the results to a list of SearchResult, i.e.
 Map<Category,List<SearchResult>> categorise(Map<Category,org.apache.lucene.search.TopDocCollector> results)
          Convert search results and categorise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResultConverter

public DefaultResultConverter(com.atlassian.bonnie.ILuceneConnection luceneConnection)
Method Detail

categorise

public Map<Category,List<SearchResult>> categorise(Map<Category,org.apache.lucene.search.TopDocCollector> results)
Description copied from interface: ResultConverter
Convert search results and categorise

Specified by:
categorise in interface ResultConverter
Parameters:
results - results to convert
Returns:
ordered results keyed by category. Search results are ordered such that highest scoring hits come first.

asList

public List<SearchResult> asList(org.apache.lucene.search.TopDocCollector results)
Description copied from interface: ResultConverter
Converts the results to a list of SearchResult, i.e. with no categorisation.

Specified by:
asList in interface ResultConverter
Parameters:
results - results to convert
Returns:
Search results are ordered such that highest scoring hits come first.


Copyright © 2003-2013 Atlassian. All Rights Reserved.