public class FeaturedSearchResource
extends org.apache.stanbol.commons.web.base.resource.BaseStanbolResource
FeaturedSearch
services.| Constructor and Description |
|---|
FeaturedSearchResource(javax.servlet.ServletContext context,
String indexName) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
get(String queryTerm,
String solrQuery,
String jsonCons,
String ontologyURI,
int offset,
int limit,
String fromStore,
javax.ws.rs.core.HttpHeaders headers)
HTTP GET method to make a featured search over Contenthub.
|
String |
getChosenFacets() |
Object |
getDocuments() |
String |
getIndexName() |
Object |
getMoreRecentItems() |
int |
getOffset() |
Object |
getOlderItems() |
Object |
getOntologies() |
int |
getPageSize() |
Object |
getQueryTerm() |
Object |
getSearchResults() |
javax.ws.rs.core.Response |
handleCorsPreflight(javax.ws.rs.core.HttpHeaders headers) |
public FeaturedSearchResource(@Context
javax.servlet.ServletContext context,
String indexName)
throws IOException,
org.osgi.framework.InvalidSyntaxException
context - indexName - Name of the LDPath program (name of the Solr core/index) to be used while storing this
content item. LDPath programs can be managed through SemanticIndexManagerResource or
SemanticIndexManagerIOExceptionorg.osgi.framework.InvalidSyntaxExceptionpublic javax.ws.rs.core.Response handleCorsPreflight(@Context
javax.ws.rs.core.HttpHeaders headers)
public final javax.ws.rs.core.Response get(String queryTerm, String solrQuery, String jsonCons, String ontologyURI, int offset, int limit, String fromStore, @Context javax.ws.rs.core.HttpHeaders headers) throws IllegalArgumentException, org.apache.stanbol.contenthub.servicesapi.search.SearchException, InstantiationException, IllegalAccessException, org.apache.solr.client.solrj.SolrServerException, IOException
queryTerm - A keyword a statement or a set of keywords which can be regarded as the query term.solrQuery - Solr query string. This is the string format which is accepted by a Solr server. For
example, q="john doe"&fl=score is a valid value for this parameter. If this
parameter exists, search is performed based on this solrQuery and any queryTerms are
neglected.jsonCons - Constrainst in JSON format. These constraints are tranformed to corresponding Solr queries
to enable faceted search. Each constraint is a facet field and values of the constraints
maps to the values of the facet fields in Solr queries.ontologyURI - URI of the ontology in which related keywords will be searched by
RelatedKeywordSearchManager.getRelatedKeywordsFromOntology(String, String)offset - The offset of the document from which the resultant documents will start as the search
result. offset and limit parameters can be used to make a pagination
mechanism for search results.limit - Maximum number of resultant documents to be returned as the search result. offset
and limit parameters can be used to make a pagination mechanism for search results.fromStore - Special parameter for HTML view only.headers - HTTP headersIllegalArgumentExceptionorg.apache.stanbol.contenthub.servicesapi.search.SearchExceptionInstantiationExceptionIllegalAccessExceptionorg.apache.solr.client.solrj.SolrServerExceptionIOExceptionpublic Object getMoreRecentItems()
public Object getOlderItems()
public int getOffset()
public int getPageSize()
public Object getSearchResults()
public Object getDocuments()
public Object getOntologies()
public Object getQueryTerm()
public String getChosenFacets()
public String getIndexName()
Copyright © 2011-2014 The Apache Software Foundation. All Rights Reserved.