Class SearchQuery

  • Direct Known Subclasses:
    FilteredSearchQuery

    public class SearchQuery
    extends Object

    SearchQuery model that contains all "explicit" parameters for a search requests, so not the filters. The main reason for this is how query-expansion works with spring boot.

    For a full search query, the extended class FilteredSearchQuery can be used.

    • Field Detail

      • q

        public String q
        the user query.
      • sort

        public String sort

        Full sorting parameter value. This is the name of the sorting and optionally a dash as prefix, thats means the sorting should be descending. Several sorting criterion can be defined by separating the values using comma.

        examples:
        • sort=price (ascending by price)
        • sort=-price (descendending by price)
        • sort=price,-name (price asc and name descending)
      • limit

        @Min(1L)
        public int limit
      • offset

        @Min(0L)
        public int offset
      • withFacets

        public boolean withFacets
        flag to specify if facets should be returned with the requested response. Should be set to false in case only the next batch of hits is requested (e.g. for endless scrolling).
    • Constructor Detail

      • SearchQuery

        public SearchQuery()