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 java.lang.Object
implements ResultConverter


Constructor Summary
DefaultResultConverter(com.atlassian.bonnie.ILuceneConnection luceneConnection)
           
 
Method Summary
 java.util.List<SearchResult> asList(org.apache.lucene.search.TopDocsCollector results)
          Converts the results to a list of SearchResult, i.e.
 java.util.Map<Category,java.util.List<SearchResult>> categorise(java.util.Map<Category,org.apache.lucene.search.TopDocsCollector> 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 java.util.Map<Category,java.util.List<SearchResult>> categorise(java.util.Map<Category,org.apache.lucene.search.TopDocsCollector> 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 java.util.List<SearchResult> asList(org.apache.lucene.search.TopDocsCollector 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-2014 Atlassian. All Rights Reserved.