Class SolrSearchEngine
- java.lang.Object
-
- fr.paris.lutece.plugins.search.solr.business.SolrSearchEngine
-
- All Implemented Interfaces:
fr.paris.lutece.portal.service.search.SearchEngine
public class SolrSearchEngine extends Object implements fr.paris.lutece.portal.service.search.SearchEngine
SolrSearchEngine
-
-
Field Summary
Fields Modifier and Type Field Description static StringSOLR_FACET_DATE_ENDstatic StringSOLR_FACET_DATE_GAPstatic intSOLR_FACET_LIMIT
-
Constructor Summary
Constructors Constructor Description SolrSearchEngine()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDocumentHighLighting(String strDocumentId, String terms)SolrFacetedResultgetFacetedSearchResults(String strQuery, String[] fl, String[] facetQueries, String sortName, String sortOrder, int nLimit, int nCurrentPageIndex, int nItemsPerPage, Boolean bSpellCheck)Return the result with facets.SolrFacetedResultgetFacetedSearchResults(String strQuery, String[] facetQueries, String sortName, String sortOrder, int nLimit, int nCurrentPageIndex, int nItemsPerPage, Boolean bSpellCheck)Return the result with facets.List<SolrSearchResult>getGeolocSearchResults(String strQuery, String[] facetQueries, int nLimit)Return the result geojseon and uidstatic SolrSearchEnginegetInstance()Returns the instanceorg.apache.solr.client.solrj.response.QueryResponsegetJsonpSuggest(String terms, String callback)StringgetJsonSearchResults(Map<String,String[]> solrParam)Return search results as jsonList<fr.paris.lutece.portal.service.search.SearchResult>getSearchResults(String strQuery, javax.servlet.http.HttpServletRequest request)Return search resultsorg.apache.solr.client.solrj.response.SpellCheckResponsegetSpellChecker(String term)Return the suggestion terms
-
-
-
Method Detail
-
getSearchResults
public List<fr.paris.lutece.portal.service.search.SearchResult> getSearchResults(String strQuery, javax.servlet.http.HttpServletRequest request)
Return search results- Specified by:
getSearchResultsin interfacefr.paris.lutece.portal.service.search.SearchEngine- Parameters:
strQuery- The search queryrequest- The HTTP request- Returns:
- Results as a collection of SearchResult
-
getJsonSearchResults
public String getJsonSearchResults(Map<String,String[]> solrParam)
Return search results as json- Parameters:
solrParam- The solrParam- Returns:
- Results as json
-
getFacetedSearchResults
public SolrFacetedResult getFacetedSearchResults(String strQuery, String[] facetQueries, String sortName, String sortOrder, int nLimit, int nCurrentPageIndex, int nItemsPerPage, Boolean bSpellCheck)
Return the result with facets. Does NOT support authentification yet.- Parameters:
strQuery- the queryfacetQueries- The selected facetssortName- The facet name to sort bysortOrder- "asc" or "desc"nLimit- Maximal number of results.- Returns:
- the result with facets
-
getFacetedSearchResults
public SolrFacetedResult getFacetedSearchResults(String strQuery, String[] fl, String[] facetQueries, String sortName, String sortOrder, int nLimit, int nCurrentPageIndex, int nItemsPerPage, Boolean bSpellCheck)
Return the result with facets. Does NOT support authentification yet.- Parameters:
strQuery- the queryfacetQueries- The selected facetsfl- the list of fieldssortName- The facet name to sort bysortOrder- "asc" or "desc"nLimit- Maximal number of results.- Returns:
- the result with facets
-
getGeolocSearchResults
public List<SolrSearchResult> getGeolocSearchResults(String strQuery, String[] facetQueries, int nLimit)
Return the result geojseon and uid- Parameters:
strQuery- the queryfacetQueries- The selected facetsnLimit- Maximal number of results.- Returns:
- the results geojson and uid
-
getSpellChecker
public org.apache.solr.client.solrj.response.SpellCheckResponse getSpellChecker(String term)
Return the suggestion terms- Parameters:
term- the terms of search- Returns:
- The spell checker response
-
getJsonpSuggest
public org.apache.solr.client.solrj.response.QueryResponse getJsonpSuggest(String terms, String callback)
-
getInstance
public static SolrSearchEngine getInstance()
Returns the instance- Returns:
- the instance
-
-