Package org.imixs.workflow.engine.solr
Klasse SolrSearchService
java.lang.Object
org.imixs.workflow.engine.solr.SolrSearchService
- Alle implementierten Schnittstellen:
SearchService
@DeclareRoles({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
@RolesAllowed({"org.imixs.ACCESSLEVEL.NOACCESS","org.imixs.ACCESSLEVEL.READERACCESS","org.imixs.ACCESSLEVEL.AUTHORACCESS","org.imixs.ACCESSLEVEL.EDITORACCESS","org.imixs.ACCESSLEVEL.MANAGERACCESS"})
public class SolrSearchService
extends Object
implements SearchService
This session ejb provides a service to search the solr index.
- Version:
- 1.0
- Autor:
- rsoika
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final intstatic final int -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetTaxonomy(String... categories) Returns the total hits for a given set of categories from the lucene taxonomy index.getTaxonomyByQuery(String searchTerm, String... categories) Returns the total hits for a given set of categories from the lucene taxonomy index based on a search query.intgetTotalHits(String _searchTerm, int _maxResult, DefaultOperator defaultOperator) Returns the total hits for a given search term from the lucene index.protected List<ItemCollection> parseQueryResult(String json) This method extracts the docs from a Solr JSON query resultsearch(String _searchTerm, int pageSize, int pageIndex, SortOrder sortOrder, DefaultOperator defaultOperator, boolean loadStubs) Returns a collection of documents matching the provided search term.
-
Felddetails
-
DEFAULT_MAX_SEARCH_RESULT
public static final int DEFAULT_MAX_SEARCH_RESULT- Siehe auch:
-
DEFAULT_PAGE_SIZE
public static final int DEFAULT_PAGE_SIZE- Siehe auch:
-
-
Konstruktordetails
-
SolrSearchService
public SolrSearchService()
-
-
Methodendetails
-
search
public List<ItemCollection> search(String _searchTerm, int pageSize, int pageIndex, SortOrder sortOrder, DefaultOperator defaultOperator, boolean loadStubs) throws QueryException Returns a collection of documents matching the provided search term. The term will be extended with the current users roles to test the read access level of each workitem matching the search term.The optional param 'searchOrder' can be set to force lucene to sort the search result by any search order.
The optional param 'defaultOperator' can be set to Operator.AND
The optional param 'stubs' indicates if the full Imixs Document should be loaded or if only the data fields stored in the lucedn index will be return. The later is the faster method but returns only document stubs.
- Angegeben von:
searchin SchnittstelleSearchService- Parameter:
_searchTerm-pageSize- - docs per pagepageIndex- - page numbersortOrder-defaultOperator- - optional to change the default search operatorloadStubs- - optional indicates of only the lucene document should be returned.searchTerm-- Gibt zurück:
- collection of search result
- Löst aus:
QueryException- in case the searchtem is not understandable.
-
getTotalHits
public int getTotalHits(String _searchTerm, int _maxResult, DefaultOperator defaultOperator) throws QueryException Returns the total hits for a given search term from the lucene index. The method did not load any data. The provided search term will we extended with a users roles to test the read access level of each workitem matching the search term.In Solr we can get the count if we the the query param 'row=0'. The the response contains still the numFound but not docs!
- Angegeben von:
getTotalHitsin SchnittstelleSearchService- Parameter:
sSearchTerm-maxResult- - max search result- Gibt zurück:
- total hits of search result
- Löst aus:
QueryException- in case the searchterm is not understandable.- Siehe auch:
-
getTaxonomyByQuery
Beschreibung aus Schnittstelle kopiert:SearchServiceReturns the total hits for a given set of categories from the lucene taxonomy index based on a search query. The method did not load any data.- Angegeben von:
getTaxonomyByQueryin SchnittstelleSearchService- Parameter:
searchTerm- - a lucene search termcategories- - a list of categories.- Gibt zurück:
- total hits of search result
-
getTaxonomy
Beschreibung aus Schnittstelle kopiert:SearchServiceReturns the total hits for a given set of categories from the lucene taxonomy index. The method did not load any data.- Angegeben von:
getTaxonomyin SchnittstelleSearchService- Parameter:
categories- - a list of categories.- Gibt zurück:
- total hits of search result
-
parseQueryResult
This method extracts the docs from a Solr JSON query result- Parameter:
json- - solr query response (JSON)- Gibt zurück:
- List of ItemCollection objects
-