@Path(value="search")
public class SearchRunner
extends java.lang.Object
Search is formatted as a JSON file with a format:
Each of these should be formatted as a JSON object, with keys type (string) and options (JSON object)
This generates an output JSON structure:
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.String> |
Models
Set of models that have been run
|
Constructor and Description |
---|
SearchRunner() |
Modifier and Type | Method and Description |
---|---|
org.json.JSONObject |
convertToJSON(MultiPropertyDataset data)
Convert the dataset into a JSON object
|
MultiPropertyDataset |
getEntries(org.json.JSONObject searchDefinition)
Generate a list of entries
|
protected java.lang.String |
performSearch(org.json.JSONObject searchDefinition)
Function that prepares the actual search
|
void |
runFilter(MultiPropertyDataset data,
org.json.JSONObject filterOptions)
Run a new model, add entries to dataset
|
MultiPropertyDataset |
runModel(MultiPropertyDataset data,
org.json.JSONObject options)
Run a new model, add entries to dataset
|
void |
runRanker(MultiPropertyDataset data,
org.json.JSONObject rankerOptions)
Run the entry ranker to get the top entries
|
java.lang.String |
runSearch(java.lang.String searchForm) |
protected java.util.Set<java.lang.String> Models
@POST @Produces(value="application/json") public java.lang.String runSearch(@FormParam(value="search") java.lang.String searchForm)
protected java.lang.String performSearch(org.json.JSONObject searchDefinition)
searchDefinition
- Search specificationpublic org.json.JSONObject convertToJSON(MultiPropertyDataset data)
data
- Dataset to be convertedpublic void runRanker(MultiPropertyDataset data, org.json.JSONObject rankerOptions)
data
- [in/out] Dataset to be ranked, will contain only top entries after runningrankerOptions
- Optiosn for the rankerpublic void runFilter(MultiPropertyDataset data, org.json.JSONObject filterOptions)
data
- Dataset of entries to runfilterOptions
- Options for modelpublic MultiPropertyDataset runModel(MultiPropertyDataset data, org.json.JSONObject options)
data
- Dataset of entries to runoptions
- Options for model. Should have 1 entry: model namepublic MultiPropertyDataset getEntries(org.json.JSONObject searchDefinition)
searchDefinition
- Definition of search routine, input to the search routine