|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.search.providers.LuceneSearchProvider
public class LuceneSearchProvider
Constructor Summary | |
---|---|
LuceneSearchProvider(IssueFactory issueFactory,
SearchProviderFactory searchProviderFactory,
PermissionsFilterGenerator permissionsFilterGenerator,
SearchHandlerManager searchHandlerManager,
SearchSortUtil searchSortUtil,
LuceneQueryBuilder luceneQueryBuilder)
|
Method Summary | |
---|---|
void |
search(Query query,
com.atlassian.crowd.embedded.api.User user,
org.apache.lucene.search.Collector collector)
Run a search based on the provided search criteria and, for each match, call Collector.collect(). |
void |
search(Query query,
com.atlassian.crowd.embedded.api.User searcher,
org.apache.lucene.search.Collector collector,
org.apache.lucene.search.Query andQuery)
Run a search based on the provided search criteria and, for each match, call Collector.collect(). |
SearchResults |
search(Query query,
com.atlassian.crowd.embedded.api.User searcher,
PagerFilter pager)
Search the index, and only return issues that are in the pager's range. |
SearchResults |
search(Query query,
com.atlassian.crowd.embedded.api.User searcher,
PagerFilter pager,
org.apache.lucene.search.Query andQuery)
Search the index, and only return issues that are in the pager's range while AND'ing the raw lucene query to the generated query from the provided searchQuery. |
void |
searchAndSort(Query query,
com.atlassian.crowd.embedded.api.User user,
org.apache.lucene.search.Collector collector,
PagerFilter pagerFilter)
Run a search based on the provided search criteria and, for each match call Collector.collect(). |
void |
searchAndSortOverrideSecurity(Query query,
com.atlassian.crowd.embedded.api.User user,
org.apache.lucene.search.Collector collector,
PagerFilter pagerFilter)
Run a search based on the provided search criteria and, for each match call Collector.collect(). |
long |
searchCount(Query query,
com.atlassian.crowd.embedded.api.User user)
Return the number of issues matching the provided search criteria. |
long |
searchCountOverrideSecurity(Query query,
com.atlassian.crowd.embedded.api.User user)
Return the number of issues matching the provided search criteria, overridding any security constraints. |
void |
searchOverrideSecurity(Query query,
com.atlassian.crowd.embedded.api.User user,
org.apache.lucene.search.Collector collector)
Run a search based on the provided search criteria and, for each match, call Collector.collect() not taking into account any security constraints. |
SearchResults |
searchOverrideSecurity(Query query,
com.atlassian.crowd.embedded.api.User searcher,
PagerFilter pager,
org.apache.lucene.search.Query andQuery)
Search the index, and only return issues that are in the pager's range while AND'ing the raw lucene query to the generated query from the provided searchQuery, not taking into account any security constraints. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LuceneSearchProvider(IssueFactory issueFactory, SearchProviderFactory searchProviderFactory, PermissionsFilterGenerator permissionsFilterGenerator, SearchHandlerManager searchHandlerManager, SearchSortUtil searchSortUtil, LuceneQueryBuilder luceneQueryBuilder)
Method Detail |
---|
public SearchResults search(Query query, com.atlassian.crowd.embedded.api.User searcher, PagerFilter pager) throws SearchException
SearchProvider
Issue
objects, and should not be
used where you need the issue for update.
Also note that if you are only after the number of search results use
SearchProvider.searchCount(com.atlassian.query.Query ,User)
as it provides better performance.
search
in interface SearchProvider
query
- contains the information required to perform the search.searcher
- the user performing the search, which will be used to create a permission filter that filters out
any of the results the user is not able to see and will be used to provide context for the search.pager
- Pager filter (use PagerFilter.getUnlimitedFilter()
to get all issues).
SearchResults
containing the resulting issues.
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query produces
lucene that is too complex to be processed.public SearchResults search(Query query, com.atlassian.crowd.embedded.api.User searcher, PagerFilter pager, org.apache.lucene.search.Query andQuery) throws SearchException
SearchProvider
Issue
objects, and should not be
used where you need the issue for update.
Also note that if you are only after the number of search results use
SearchProvider.searchCount(com.atlassian.query.Query ,User)
as it provides better performance.
search
in interface SearchProvider
query
- contains the information required to perform the search.searcher
- the user performing the search, which will be used to create a permission filter that filters out
any of the results the user is not able to see and will be used to provide context for the search.pager
- Pager filter (use PagerFilter.getUnlimitedFilter()
to get all issues).andQuery
- raw lucene Query to AND with the request.
SearchResults
containing the resulting issues.
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query produces
lucene that is too complex to be processed.public SearchResults searchOverrideSecurity(Query query, com.atlassian.crowd.embedded.api.User searcher, PagerFilter pager, org.apache.lucene.search.Query andQuery) throws SearchException
SearchProvider
SearchProvider.search(com.atlassian.query.Query , User, com.atlassian.jira.web.bean.PagerFilter, org.apache.lucene.search.Query)
instead, this should only be used when performing administrative tasks where you need to know ALL the issues
that will be affected.
Note that this method returns read only Issue
objects, and should not be
used where you need the issue for update. Also note that if you are only after the number of search
results use SearchProvider.searchCount(com.atlassian.query.Query, User)
as it provides better performance.
searchOverrideSecurity
in interface SearchProvider
query
- contains the information required to perform the search.searcher
- the user performing the search which will be used to provide context for the search.pager
- Pager filter (use PagerFilter.getUnlimitedFilter()
to get all issues).andQuery
- raw lucene Query to AND with the request.
SearchResults
containing the resulting issues.
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query produces
lucene that is too complex to be processed.public long searchCount(Query query, com.atlassian.crowd.embedded.api.User user) throws SearchException
SearchProvider
SearchProvider.search(com.atlassian.query.Query ,User, com.atlassian.jira.web.bean.PagerFilter)
searchCount
in interface SearchProvider
query
- contains the information required to perform the search.user
- the user performing the search which will be used to provide context for the search.
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query produces
lucene that is too complex to be processed.public long searchCountOverrideSecurity(Query query, com.atlassian.crowd.embedded.api.User user) throws SearchException
SearchProvider
SearchProvider.searchCount(com.atlassian.query.Query , User)
instead, this should only be used when performing administrative tasks where you need to know ALL the issues
that will be affected.
Note: This does not load all results into memory and provides better performance than
SearchProvider.search(com.atlassian.query.Query ,User, com.atlassian.jira.web.bean.PagerFilter)
searchCountOverrideSecurity
in interface SearchProvider
query
- contains the information required to perform the search.user
- the user performing the search which will be used to provide context for the search.
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query produces
lucene that is too complex to be processed.public void search(Query query, com.atlassian.crowd.embedded.api.User user, org.apache.lucene.search.Collector collector) throws SearchException
SearchProvider
search
in interface SearchProvider
query
- contains the information required to perform the search.user
- the user performing the search which will be used to provide context for the search.collector
- the Lucene object that will have collect called for each match.
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query produces
lucene that is too complex to be processed.public void search(Query query, com.atlassian.crowd.embedded.api.User searcher, org.apache.lucene.search.Collector collector, org.apache.lucene.search.Query andQuery) throws SearchException
SearchProvider
search
in interface SearchProvider
query
- contains the information required to perform the search.searcher
- the user performing the search which will be used to provide context for the search.collector
- the Lucene object that will have collect called for each match.andQuery
- additional Lucene query to be anded with the lucene query that will be generated from JQL
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query
produces lucene that is too complex to be processed.public void searchOverrideSecurity(Query query, com.atlassian.crowd.embedded.api.User user, org.apache.lucene.search.Collector collector) throws SearchException
SearchProvider
SearchProvider.search(com.atlassian.query.Query , User, org.apache.lucene.search.Collector)
instead, this should only be used when performing administrative tasks where you need to know ALL the issues
that will be affected.
Collectors are low level Lucene classes, but they allow issues to be placed into buckets very quickly.
Many of JIRA's graphs and stats are generated in this manner. This method is useful if you need to execute a
query in constant-memory (i.e. you do not want to load the results of your complete search into memory).
searchOverrideSecurity
in interface SearchProvider
query
- contains the information required to perform the search.user
- the user performing the search which will be used to provide context for the search.collector
- the Lucene object that will have collect called for each match.
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query produces
lucene that is too complex to be processed.public void searchAndSort(Query query, com.atlassian.crowd.embedded.api.User user, org.apache.lucene.search.Collector collector, PagerFilter pagerFilter) throws SearchException
SearchProvider
SearchProvider.search(com.atlassian.query.Query ,User, org.apache.lucene.search.Collector)
.
You may limit the number of results being collected by the Collector using the PagerFilter parameter.
This method is useful if you need to execute a query in constant-memory (i.e. you do not want to load
the results of your complete search into memory).
searchAndSort
in interface SearchProvider
query
- contains the information required to perform the search.user
- the user performing the search which will be used to provide context for the search.collector
- the Lucene object that will have collect called for each match.pagerFilter
- Pager filter (use PagerFilter.getUnlimitedFilter()
to get all issues).
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query produces
lucene that is too complex to be processed.public void searchAndSortOverrideSecurity(Query query, com.atlassian.crowd.embedded.api.User user, org.apache.lucene.search.Collector collector, PagerFilter pagerFilter) throws SearchException
SearchProvider
SearchProvider.searchAndSort(com.atlassian.query.Query , User, org.apache.lucene.search.Collector, com.atlassian.jira.web.bean.PagerFilter)
instead, this should only be used when performing administrative tasks where you need to know ALL the issues
that will be effected.
Note: this is much slower than using SearchProvider.search(com.atlassian.query.Query ,User, org.apache.lucene.search.Collector)
.
You may limit the number of results being collected by the Collector using the PagerFilter parameter.
This method is useful if you need to execute a query in constant-memory (i.e. you do not want to load
the results of your complete search into memory).
searchAndSortOverrideSecurity
in interface SearchProvider
query
- contains the information required to perform the search.user
- the user performing the search which will be used to provide context for the search.collector
- the Lucene object that will have collect called for each match.pagerFilter
- Pager filter (use PagerFilter.getUnlimitedFilter()
to get all issues).
SearchException
- thrown if there is a severe problem encountered with lucene when searching (wraps an
IOException).
ClauseTooComplexSearchException
- if the query or part of the query produces
lucene that is too complex to be processed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |