public class HibernateSearch extends Object
Modifier and Type | Method and Description |
---|---|
protected void |
checkEnableHasAttribute(org.hibernate.search.FullTextQuery fullTextQuery,
SearchQuery.Parameters parameters) |
protected org.hibernate.search.FullTextQuery |
checkEnableSecurityFilter(String userId,
org.hibernate.search.FullTextQuery fullTextQuery)
Enables the security filter if the account does not have administrative privileges
|
protected static String |
cleanQuery(String query) |
protected void |
createBlastFilterQuery(org.hibernate.search.FullTextSession fullTextSession,
HashMap<String,SearchResult> blastResults,
org.apache.lucene.search.BooleanQuery.Builder builder) |
SearchResults |
executeSearch(String userId,
HashMap<String,QueryType> terms,
SearchQuery searchQuery,
HashMap<String,SearchResult> blastResults) |
SearchResults |
executeSearchNoTerms(String userId,
HashMap<String,SearchResult> blastResults,
SearchQuery searchQuery) |
SearchResults |
filterBlastResults(String userId,
int start,
int count,
SearchQuery searchQuery,
HashMap<String,SearchResult> blastResults)
Intended to be called after running a blast search to filter the results.
|
protected org.apache.lucene.search.BooleanQuery.Builder |
generateQueriesForType(org.hibernate.search.FullTextSession fullTextSession,
HashSet<String> fields,
org.apache.lucene.search.BooleanQuery.Builder builder,
String term,
QueryType type,
BioSafetyOption option) |
static HibernateSearch |
getInstance()
Retrieve the singleton instance of this class.
|
protected org.apache.lucene.search.Sort |
getSort(boolean asc,
ColumnField sortField) |
public static HibernateSearch getInstance()
public SearchResults executeSearchNoTerms(String userId, HashMap<String,SearchResult> blastResults, SearchQuery searchQuery)
public SearchResults filterBlastResults(String userId, int start, int count, SearchQuery searchQuery, HashMap<String,SearchResult> blastResults)
userId
- identifier for account of user performing searchstart
- paging startcount
- maximum number of results to returnblastResults
- raw results of the blast searchpublic SearchResults executeSearch(String userId, HashMap<String,QueryType> terms, SearchQuery searchQuery, HashMap<String,SearchResult> blastResults)
protected org.apache.lucene.search.BooleanQuery.Builder generateQueriesForType(org.hibernate.search.FullTextSession fullTextSession, HashSet<String> fields, org.apache.lucene.search.BooleanQuery.Builder builder, String term, QueryType type, BioSafetyOption option)
protected org.apache.lucene.search.Sort getSort(boolean asc, ColumnField sortField)
protected void createBlastFilterQuery(org.hibernate.search.FullTextSession fullTextSession, HashMap<String,SearchResult> blastResults, org.apache.lucene.search.BooleanQuery.Builder builder)
protected org.hibernate.search.FullTextQuery checkEnableSecurityFilter(String userId, org.hibernate.search.FullTextQuery fullTextQuery)
userId
- identifier for account which is checked for administrative privsfullTextQuery
- search fulltextquery for which filter is enabledprotected void checkEnableHasAttribute(org.hibernate.search.FullTextQuery fullTextQuery, SearchQuery.Parameters parameters)
Copyright © 2017. All rights reserved.