org.mycore.services.fieldquery
Class MCRMoreLikeThis
java.lang.Object
org.mycore.services.fieldquery.MCRMoreLikeThis
public class MCRMoreLikeThis
- extends Object
Uses package queries from lucene/contrib/queries to do a "more like this"
query. When using this class, you have to define a field "score" in
searchfields.xml:
- Author:
- Harald Richter, Frank Lützenkirchen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MCRMoreLikeThis
public MCRMoreLikeThis()
moreLikeThis
public static MCRResults moreLikeThis(MCRFieldValue value,
double minScore,
int maxResults)
throws Exception
- Does "more like this" query, used to find documents with similar content.
The results contain a metadata field "score" which contains a value
between 0 and 1 indicating similarity to the given field value.
- Parameters:
value - the MCRFieldValue to search similar entries forminScore - the minimum score the hits must reach, a value between 0 and
1, for example 0.9maxResults - the maximum number of hits to return. A value less than 1
means to return all hits.
- Returns:
- the MCRResults of the search
- Throws:
Exception