public class SearchController extends Object
SearchController
class handles all of the query threads for asynchronous queries.Constructor and Description |
---|
SearchController(CatalogFramework framework,
ActionRegistry actionRegistry,
FilterAdapter filterAdapter,
ExecutorService executorService)
Create a new SearchController
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys this controller.
|
void |
executeQuery(SearchRequest request,
org.cometd.bayeux.server.ServerSession session,
Subject subject)
Execute all of the queries contained within the
SearchRequest . |
Boolean |
getCacheDisabled() |
FilterAdapter |
getFilterAdapter() |
CatalogFramework |
getFramework() |
int |
getMaxQueryResults() |
String |
getSortBy(Query query) |
void |
publishResults(String id,
Map<String,Object> jsonData,
org.cometd.bayeux.server.ServerSession serverSession)
Immediately publish results out to clients
|
void |
setBayeuxServer(org.cometd.bayeux.server.BayeuxServer bayeuxServer) |
void |
setCacheDisabled(Boolean cacheDisabled) |
void |
setNormalizationDisabled(Boolean normalizationDisabled) |
boolean |
shouldNormalizeDistance(SearchRequest request) |
boolean |
shouldNormalizeRelevance(SearchRequest request) |
public SearchController(CatalogFramework framework, ActionRegistry actionRegistry, FilterAdapter filterAdapter, ExecutorService executorService)
framework
- CatalogFramework
that will be handling the actual queriesfilterAdapter
- public void destroy()
public void publishResults(String id, Map<String,Object> jsonData, org.cometd.bayeux.server.ServerSession serverSession)
id
- request idjsonData
- serverSession
- public void executeQuery(SearchRequest request, org.cometd.bayeux.server.ServerSession session, Subject subject)
SearchRequest
.request
- SearchRequest
containing a query for 1 or more sourcessession
- Cometd ServerSession
public boolean shouldNormalizeDistance(SearchRequest request)
public boolean shouldNormalizeRelevance(SearchRequest request)
public CatalogFramework getFramework()
public void setBayeuxServer(org.cometd.bayeux.server.BayeuxServer bayeuxServer)
public void setCacheDisabled(Boolean cacheDisabled)
public Boolean getCacheDisabled()
public FilterAdapter getFilterAdapter()
public void setNormalizationDisabled(Boolean normalizationDisabled)
public int getMaxQueryResults()
This work is licensed under a Creative Commons Attribution 4.0 International License.