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_RANKED_BY
public static final java.lang.String TO_BE_RANKED_BY
- See Also:
- Constant Field Values
TO_BE_RANKED_ASCENDING
public static final java.lang.String TO_BE_RANKED_ASCENDING
- See Also:
- Constant Field Values
HAS_SCOPE
public static final java.lang.String HAS_SCOPE
- 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
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)
getConf
public SolrConfig getConf()
setConf
public void setConf(SolrConfig conf)
Copyright © 2004-2012. All Rights Reserved.