Package org.apache.solr.handler
Class MoreLikeThisHandler.MoreLikeThisHelper
- java.lang.Object
-
- org.apache.solr.handler.MoreLikeThisHandler.MoreLikeThisHelper
-
- Enclosing class:
- MoreLikeThisHandler
public static class MoreLikeThisHandler.MoreLikeThisHelper extends Object
Helper class for MoreLikeThis that can be called from other request handlers
-
-
Constructor Summary
Constructors Constructor Description MoreLikeThisHelper(org.apache.solr.common.params.SolrParams params, SolrIndexSearcher searcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.search.BooleanQuery
getBoostedMLTQuery()
org.apache.lucene.search.BooleanQuery
getBoostedMLTQuery(int docNum)
SetsboostedMLTQuery
and returns itList<MoreLikeThisHandler.InterestingTerm>
getInterestingTerms(org.apache.lucene.search.BooleanQuery boostedMLTQuery, int maxTerms)
Yields terms with boosts from the boosted MLT query.org.apache.lucene.queries.mlt.MoreLikeThis
getMoreLikeThis()
DocListAndSet
getMoreLikeThis(int id, int start, int rows, List<org.apache.lucene.search.Query> filters, int flags)
DocListAndSet
getMoreLikeThis(Reader reader, int start, int rows, List<org.apache.lucene.search.Query> filters, int flags)
org.apache.lucene.search.Query
getRawMLTQuery()
org.apache.lucene.search.Query
getRealMLTQuery()
-
-
-
Constructor Detail
-
MoreLikeThisHelper
public MoreLikeThisHelper(org.apache.solr.common.params.SolrParams params, SolrIndexSearcher searcher) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getRawMLTQuery
public org.apache.lucene.search.Query getRawMLTQuery()
-
getBoostedMLTQuery
public org.apache.lucene.search.BooleanQuery getBoostedMLTQuery()
-
getRealMLTQuery
public org.apache.lucene.search.Query getRealMLTQuery()
-
getMoreLikeThis
public DocListAndSet getMoreLikeThis(int id, int start, int rows, List<org.apache.lucene.search.Query> filters, int flags) throws IOException
- Throws:
IOException
-
getBoostedMLTQuery
public org.apache.lucene.search.BooleanQuery getBoostedMLTQuery(int docNum) throws IOException
SetsboostedMLTQuery
and returns it- Throws:
IOException
-
getMoreLikeThis
public DocListAndSet getMoreLikeThis(Reader reader, int start, int rows, List<org.apache.lucene.search.Query> filters, int flags) throws IOException
- Throws:
IOException
-
getInterestingTerms
public List<MoreLikeThisHandler.InterestingTerm> getInterestingTerms(org.apache.lucene.search.BooleanQuery boostedMLTQuery, int maxTerms)
Yields terms with boosts from the boosted MLT query.- Parameters:
maxTerms
- how many terms to return, a negative value means all terms are returned
-
getMoreLikeThis
public org.apache.lucene.queries.mlt.MoreLikeThis getMoreLikeThis()
-
-