|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.search.parameters.lucene.util.QueryForCommentsCreator
public final class QueryForCommentsCreator
Nested Class Summary | |
---|---|
(package private) static class |
QueryForCommentsCreator.BoostQueryCreator
Implement this class in order to create query for boost field |
Method Summary | |
---|---|
(package private) static org.apache.lucene.search.Query |
boostQuery(org.apache.lucene.search.Query query,
List fieldsList,
Map boostMap,
QueryForCommentsCreator.BoostQueryCreator creator)
Boosts the given query with the list of fields that are in the given list and the boost map. |
(package private) static org.apache.lucene.search.Query |
createCommentInProjectAndUserInRoleQuery(Long projectId,
Long projectRoleId)
Creates a new query that sets the project id must be equal to the given value and the project role visibility of the comment must be equal to the given value. |
static org.apache.lucene.search.Query |
createGroupLevelQuery(List groups)
Creates a new query with OR-ed groups |
static org.apache.lucene.search.Query |
createNoGroupOrProjectRoleLevelQuery()
Creates new query with the restriction of comment group level set to -1 (no group level) AND comment project role level set to -1 (no project role level). |
static org.apache.lucene.search.Query |
createProjectRoleLevelQuery(ProjectRoleManager.ProjectIdToProjectRoleIdsMap projectIdToProjectRolesMap)
Creates a project role level based restriction query. |
static org.apache.lucene.search.Query |
createTextQuery(List fieldsList,
String searchText,
Map boostMap)
This method creates a boosted query (if boostMap is specified). |
(package private) static org.apache.lucene.search.BooleanClause.Occur[] |
generateShoulds(int size)
Generates the array of BooleanClause.Occur.SHOULD with given size. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.apache.lucene.search.Query createNoGroupOrProjectRoleLevelQuery()
public static org.apache.lucene.search.Query createGroupLevelQuery(List groups) throws IllegalArgumentException
groups
- a list of groups to include in the query (List[String])
IllegalArgumentException
- if groups is null or emptypublic static org.apache.lucene.search.Query createProjectRoleLevelQuery(ProjectRoleManager.ProjectIdToProjectRoleIdsMap projectIdToProjectRolesMap)
projectIdToProjectRolesMap
- Map[Long,Collection[ProjectRole]]
IllegalArgumentException
- if projectIdToProjectRolesMap is null or emptypublic static org.apache.lucene.search.Query createTextQuery(List fieldsList, String searchText, Map boostMap) throws IllegalArgumentException, org.apache.lucene.queryParser.ParseException
fieldsList
- field listsearchText
- search textboostMap
- boost map
IllegalArgumentException
- if field list is null
org.apache.lucene.queryParser.ParseException
- if parsing erro occursstatic org.apache.lucene.search.Query createCommentInProjectAndUserInRoleQuery(Long projectId, Long projectRoleId) throws IllegalArgumentException
projectId
- project IDprojectRoleId
- project role ID
IllegalArgumentException
- if either of the parameters is nullstatic org.apache.lucene.search.BooleanClause.Occur[] generateShoulds(int size) throws IllegalArgumentException
size
- size of the array to generate
IllegalArgumentException
- is size is less than 0static org.apache.lucene.search.Query boostQuery(org.apache.lucene.search.Query query, List fieldsList, Map boostMap, QueryForCommentsCreator.BoostQueryCreator creator) throws org.apache.lucene.queryParser.ParseException
query
- query to boostfieldsList
- list of fields to boostboostMap
- boost mapcreator
- boost query creator
org.apache.lucene.queryParser.ParseException
- if parsing error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |