|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dftproject.genesis.core.search.AbstractSearchHitCollector
org.dftproject.genesis.core.search.SimpleSearchHitCollector
public class SimpleSearchHitCollector
A simple implementation of a hit collector.
| Field Summary | |
|---|---|
static java.lang.String |
ID
The SimpleSearchHitCollector ID. |
| Constructor Summary | |
|---|---|
SimpleSearchHitCollector()
|
|
| Method Summary | |
|---|---|
protected double |
getDateScore(java.lang.String predicate,
IResourceNode expected,
IResourceNode value)
Returns the score for a date comparison for the given field between the given search result and the given query example. |
protected double |
getGenderScore(IResourceNode expected,
IResourceNode value)
Returns the score for a gender comparison between the given search result and the given query example. |
protected double |
getNameScore(IResourceNode expected,
IResourceNode value)
Returns the score for a name comparison between the given search result and the given query example. |
protected double |
getPlaceScore(java.lang.String predicate,
IResourceNode expected,
IResourceNode value)
Returns the score for a place comparison for the given field between the given search result and the given query example. |
double |
getScore(IResourceNode expected,
IResourceNode value)
Returns the score for a given search result compared to the given query example. |
double |
getThreshold()
Returns the minimum score cut-off for a "good" search result. |
void |
start(IResourceNode query)
Starts collecting search results for the given query. |
void |
stop()
Stops collecting search results. |
| Methods inherited from class org.dftproject.genesis.core.search.AbstractSearchHitCollector |
|---|
addHitListener, notifyHitListeners, removeHitListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ID
| Constructor Detail |
|---|
public SimpleSearchHitCollector()
| Method Detail |
|---|
public void start(IResourceNode query)
AbstractSearchHitCollectorThe query is given as an example. The hit collector should try to collect resources that are similar to the query example. Score should reflect how closely a resource matches the query example.
start in class AbstractSearchHitCollectorquery - the querypublic void stop()
AbstractSearchHitCollector
stop in class AbstractSearchHitCollectorpublic double getThreshold()
public double getScore(IResourceNode expected,
IResourceNode value)
expected - the query examplevalue - the search result
protected double getNameScore(IResourceNode expected,
IResourceNode value)
expected - the query examplevalue - the search result
protected double getDateScore(java.lang.String predicate,
IResourceNode expected,
IResourceNode value)
predicate - the fieldexpected - the query examplevalue - the search result
protected double getPlaceScore(java.lang.String predicate,
IResourceNode expected,
IResourceNode value)
predicate - the fieldexpected - the query examplevalue - the search result
protected double getGenderScore(IResourceNode expected,
IResourceNode value)
expected - the query examplevalue - the search result
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||