Interface SearchQuery

All Superinterfaces:
Expandable<SearchQuery>
All Known Implementing Classes:
AbstractParameterListQuery, AbstractUserQuery, ActiveUserInfoQuery, ActiveUserQuery, AllQuery, ArchivedSpacesQuery, AttachmentTypeQuery, BooleanQuery, BrowseUsersPermissionQuery, ConstantScoreQuery, ContainingContentTypeQuery, ContentCategoryQuery, ContentPermissionsQuery, ContentStatusQuery, ContentTypeQuery, ContributorQuery, CreatorQuery, CustomContentTypeQuery, DateRangeQuery, DoubleRangeQuery, EnabledCustomContentTypesQuery, FieldExistsQuery, FileExtensionQuery, FunctionScoreQuery, HasPersonalSpaceQuery, InheritedLabelQuery, InSpaceQuery, IntegerRangeQuery, LabelQuery, LabelsQuery, LastModifierUserQuery, LongRangeQuery, MacroStorageVersionQuery, MacroUsageQuery, MatchNoDocsQuery, MultiTextFieldQuery, NonViewableCustomContentTypeQuery, NotAnonymousUserQuery, PhraseQuery, PrefixQuery, QueryStringQuery, SiteSearchPermissionsQuery, SiteTextSearchQuery, SpaceCategoryQuery, SpacePermissionQuery, SpanNearQuery, TermQuery, TermRangeQuery, TermSetQuery, TextFieldQuery, TextQuery, TextSearchQuery, UserInfoQuery, UserTextQuery, WildcardTextFieldQuery

public interface SearchQuery extends Expandable<SearchQuery>
A query to be performed against the search index. Implementations should be immutable.

Queries consist of a key (a unique string, usually a plugin module complete key, to identify the type of query being performed) and a list of parameters which may either be strings, or other instances of SearchQuery.

  • Field Details

  • Method Details

    • getKey

      String getKey()
      Returns:
      the plugin key
    • getParameters

      default List getParameters()
      List of parameters as Strings or SearchQuerys.
      Returns:
      Strings or SearchQuerys.
    • expand

      default SearchQuery expand()
      Expands this query into a composite query (that composes other queries). By overriding this method, one can specify a new query that is composition of the behaviour of the composed queries.
      Specified by:
      expand in interface Expandable<SearchQuery>
      Returns:
      a query
    • getBoost

      default float getBoost()
      Return boost factor of this query. It will take effect when the query is used in combination with others e.g. in BooleanQuery.
      Returns:
      boost factor
    • getSubClauses

      default Stream<SubClause<SearchQuery>> getSubClauses()
      Returns a stream of nested queries.
      Since:
      7.14