|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.weblab.services.solr.SolrComponent
public class SolrComponent
Component used to :
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_CORE_PREFIX
Default SolR prefix |
static java.lang.String |
IDREF
Service ID reference |
static java.lang.String |
IDRES_HIT_PREFIX
Service ID-res prefix for Hit |
static java.lang.String |
IDRES_QUERY_PREFIX
Service ID-res prefix for Query |
static java.lang.String |
IDRES_RESULT_PREFIX
Service ID-res prefix for resultSet |
protected static java.lang.String |
SOLR_CONFIG
|
protected static java.lang.String |
SOLR_DATA_HOME
|
protected static java.lang.String |
SOLR_HOME
These are the parameters for the remote Solr server used. |
protected static java.lang.String |
SOLR_SCHEMA
|
| Method Summary | |
|---|---|
void |
addDocument(org.apache.solr.common.SolrInputDocument doc)
|
void |
commit()
Commit method only flush and optimize index. |
static void |
deleteInstance(java.lang.String context)
|
static java.lang.String |
extractTextFromResource(org.ow2.weblab.core.model.MediaUnit res)
Util method to concatenate text content dispatched in multiple Text units in a document. |
org.apache.solr.client.solrj.response.QueryResponse |
facetSuggest(java.lang.String queryString,
int offset,
int limit)
|
java.lang.String |
getCoreDataHome()
|
java.lang.String |
getCoreName()
|
static SolrComponent |
getInstance(java.lang.String solrURL,
java.lang.String context)
Retrieve SolrComponent instance depending on context |
org.apache.solr.client.solrj.response.QueryResponse |
getMetaData(java.lang.String... uri)
Query the solr server to get the metadata associated to a list of document URIs |
java.lang.String |
getSolrURL()
|
java.lang.String |
getStatus()
Status of SolR core linked to that instance |
org.apache.solr.client.solrj.response.QueryResponse |
highlight(java.lang.String queryString,
int offset,
int limit)
Highlight method that enrich search results with text content where the matching terms have been emphased. |
org.apache.solr.client.solrj.response.QueryResponse |
moreLikeThis(java.lang.String queryString,
int offset,
int limit)
MoreLikeThis is a specific Solr query used to retrieve similar documents from a document id or text. |
org.apache.solr.client.solrj.response.QueryResponse |
search(java.lang.String queryString,
int offset,
int limit)
Search method query solr server with string of the query offset limit |
org.apache.solr.client.solrj.response.QueryResponse |
search(java.lang.String queryString,
int offset,
int limit,
java.lang.String sortField,
org.apache.solr.client.solrj.SolrQuery.ORDER order)
Search method query solr server with string of the query offset limit |
void |
setCoreDataHome(java.lang.String coreDataHome)
|
void |
setSolrURL(java.lang.String solrURL)
|
org.apache.solr.client.solrj.response.QueryResponse |
spellSuggest(java.lang.String queryString)
|
| 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 IDREF
public static final java.lang.String IDRES_RESULT_PREFIX
public static final java.lang.String IDRES_QUERY_PREFIX
public static final java.lang.String IDRES_HIT_PREFIX
public static final java.lang.String DEFAULT_CORE_PREFIX
protected static java.lang.String SOLR_HOME
protected static java.lang.String SOLR_CONFIG
protected static java.lang.String SOLR_SCHEMA
protected static java.lang.String SOLR_DATA_HOME
| Method Detail |
|---|
public static SolrComponent getInstance(java.lang.String solrURL,
java.lang.String context)
context -
SolrComponent associated to the contextpublic static void deleteInstance(java.lang.String context)
public static java.lang.String extractTextFromResource(org.ow2.weblab.core.model.MediaUnit res)
res -
public java.lang.String getStatus()
public void addDocument(org.apache.solr.common.SolrInputDocument doc)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
org.ow2.weblab.core.extended.exception.WebLabCheckedExceptionpublic void commit()
public org.apache.solr.client.solrj.response.QueryResponse search(java.lang.String queryString,
int offset,
int limit)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
queryString - is the full-text query in Lucene syntaxoffset - is the rank of the first result to be returnedlimit - is the size of the results list to be returned
QueryResponse containing scored hits each
one being linked to the Document uri
org.ow2.weblab.core.extended.exception.WebLabCheckedException
public org.apache.solr.client.solrj.response.QueryResponse search(java.lang.String queryString,
int offset,
int limit,
java.lang.String sortField,
org.apache.solr.client.solrj.SolrQuery.ORDER order)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
queryString - is the full-text query in Lucene syntaxoffset - is the rank of the first result to be returnedlimit - is the size of the results list to be returnedsortField - is a specific field to use for sorting resultsorder - is the ordering model to use for sorting: either ORDER.desc or ORDER.asc
QueryResponse containing scored hits each
one being linked to the Document uri
org.ow2.weblab.core.extended.exception.WebLabCheckedException
public org.apache.solr.client.solrj.response.QueryResponse getMetaData(java.lang.String... uri)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
uri - : the list of URI
org.ow2.weblab.core.extended.exception.WebLabCheckedException - is thrown if the query is not correctly handled
public org.apache.solr.client.solrj.response.QueryResponse highlight(java.lang.String queryString,
int offset,
int limit)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
queryString - is the full-text query in Lucene syntaxoffset - is the rank of the first result to be returnedlimit - is the size of the results list to be returned
QueryResponse containing hits with
highligted content
org.ow2.weblab.core.extended.exception.WebLabCheckedExceptionpublic org.apache.solr.client.solrj.response.QueryResponse spellSuggest(java.lang.String queryString)
public org.apache.solr.client.solrj.response.QueryResponse facetSuggest(java.lang.String queryString,
int offset,
int limit)
public org.apache.solr.client.solrj.response.QueryResponse moreLikeThis(java.lang.String queryString,
int offset,
int limit)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
queryString - the reference text or document to find similar docs (id:"doc1"
for example)
QueryResponse with document list
org.ow2.weblab.core.extended.exception.WebLabCheckedExceptionpublic java.lang.String getCoreName()
public java.lang.String getSolrURL()
public void setSolrURL(java.lang.String solrURL)
public java.lang.String getCoreDataHome()
public void setCoreDataHome(java.lang.String coreDataHome)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||