org.ow2.weblab.services.solr.searcher
Class SolrSearcher
java.lang.Object
org.ow2.weblab.services.solr.searcher.SolrSearcher
- All Implemented Interfaces:
- org.ow2.weblab.core.services.Searcher
public class SolrSearcher
- extends java.lang.Object
- implements org.ow2.weblab.core.services.Searcher
Searcher using Embedded Solr server.
RDF output is generated with Jena and can be enriched with metadata stored in
index. This should be define in searcher configuration file.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TO_BE_ORDERED_BY
public static final java.lang.String TO_BE_ORDERED_BY
- See Also:
- Constant Field Values
ASCENDENT_ORDERING_MODE_EXPECTED
public static final java.lang.String ASCENDENT_ORDERING_MODE_EXPECTED
- See Also:
- Constant Field Values
BEAN_NAME
public static final java.lang.String BEAN_NAME
- See Also:
- Constant Field Values
SolrSearcher
public SolrSearcher()
init
@PostConstruct
public void init()
destroy
@PreDestroy
public void destroy()
search
public org.ow2.weblab.core.services.searcher.SearchReturn search(org.ow2.weblab.core.services.searcher.SearchArgs arg)
throws org.ow2.weblab.core.services.InvalidParameterException,
org.ow2.weblab.core.services.ServiceNotConfiguredException,
org.ow2.weblab.core.services.UnexpectedException
- Specified by:
search in interface org.ow2.weblab.core.services.Searcher
- Throws:
org.ow2.weblab.core.services.InvalidParameterException
org.ow2.weblab.core.services.ServiceNotConfiguredException
org.ow2.weblab.core.services.UnexpectedException
search
public org.ow2.weblab.core.model.ResultSet search(java.lang.String context,
org.ow2.weblab.core.model.Query q,
int offset,
int limit)
throws org.ow2.weblab.core.services.InvalidParameterException,
org.ow2.weblab.core.services.ServiceNotConfiguredException,
org.ow2.weblab.core.services.UnexpectedException
- Use
SolrComponent for Solr index querying and format
response in RDF with Jena.
The ResultSet contains a Pok which himself contains Hits.
If enrichment is activated, all fields presents in index and search
configuration file are annotated.
- Parameters:
q - the Weblab StringQueryoffset - results start indexlimit - results end index
- Returns:
- the
ResultSet containing hits
- Throws:
org.ow2.weblab.core.services.ServiceNotConfiguredException
org.ow2.weblab.core.services.UnexpectedException
javax.mail.search.SearchException
org.ow2.weblab.core.services.InvalidParameterException
launchSimilarityQuery
protected org.apache.solr.client.solrj.response.QueryResponse launchSimilarityQuery(org.ow2.weblab.core.model.Query q,
int offset,
int limit,
SolrComponent instance)
throws org.ow2.weblab.core.extended.exception.WebLabCheckedException
- Throws:
org.ow2.weblab.core.extended.exception.WebLabCheckedException
getIndexerConfig
public SolrIndexerConfig getIndexerConfig()
setIndexerConfig
public void setIndexerConfig(SolrIndexerConfig indexerConfig)
getSolrURL
public java.lang.String getSolrURL()
setSolrURL
public void setSolrURL(java.lang.String solrURL)
getEnricher
public ResultSetMetadataEnrichment getEnricher()
setEnricher
public void setEnricher(ResultSetMetadataEnrichment enricher)
getHighlighter
public Highlighter getHighlighter()
setHighlighter
public void setHighlighter(Highlighter highlighter)
getFacetSuggestion
public FacetSuggestion getFacetSuggestion()
setFacetSuggestion
public void setFacetSuggestion(FacetSuggestion facetSuggestion)
isNoCore
public boolean isNoCore()
setNoCore
public void setNoCore(boolean noCore)
Copyright © 2004-2012. All Rights Reserved.