Class RequestSearchByField


  • public class RequestSearchByField
    extends RequestBase<Item>
    The RequestSearchByField class returns items filtered by tag values.

    Request Search By Field is similar to RequestItem. However, this class provides setMatchType(MatchType) to specify match type.

    This is the class returned by ContentDiscovery.searchByFieldRequest(Map) )} ()} (String)}.

    It has method to execute request synchronously and asynchronously and provides a set of Set methods for parameters.
    • Method Detail

      • setContentType

        public void setContentType​(java.lang.String contentType)
        Specifies the content type to filter the results.

        Example: movie, audio and tv series.
        Parameters:
        contentType - Only accepts the strings defined in ContentType.Type
      • setMatchType

        public void setMatchType​(MatchType matchType)
        Specifies the match type to filter results.

        The types of matches are:
        • MatchType.BROAD_MATCH: broad or fuzzy match. Search criteria includes: typo correction, not all words need to exist.

        • MatchType.PHRASE_MATCH: phrase match. Search criteria includes: typo correction, all words need to be included.

        • MatchType.EXACT_MATCH: exact match. Search criteria includes: no typo correction, text needs to be exact.



        The default is MatchType.BROAD_MATCH
        Parameters:
        matchType - Sets the type of match as broad, phrase or exact.
      • setSeatClass

        public void setSeatClass​(java.lang.String seatClass)
        Specifies the seat class, such as first or business.

        If not specified, SeatClass.All will be used.
        Parameters:
        seatClass - Only accepts strings provided by SeatClass.
      • setFilterFields

        public void setFilterFields​(java.util.Map<SearchFilter,​java.lang.String> filterFields)
        Specifies the fields to filter the results.

        Example: duration, subtitle, soundtrack, rating and category.

        Multiple fields are allowed.
        Parameters:
        filterFields - Fields to use in filtering the results.
      • setRequestedFields

        public void setRequestedFields​(java.util.Set<java.lang.String> requestedFields)
        Specifies fields to be returned.

        Example: Title, genre, year, artist, actor and director.

        If set, only the specified fields are returned.
        If not set, all fields will be returned.
        Parameters:
        requestedFields - Fields to return.
      • setImageSizeSelectors

        public void setImageSizeSelectors​(java.util.Set<java.lang.Integer> imageSizeSelectors)
        Returns images, such as posters or synopses, in the specified size as defined by the airline.

        When both image_size_selector and image_resolution are present, image_size_selector takes priority.

        If neither are present, all images will be returned.
        Parameters:
        imageSizeSelectors - Specifies the image size.
      • setImageResolutions

        public void setImageResolutions​(java.util.Set<java.lang.String> imageResolutions)
        Returns images, such as posters or synopses, in the specified resolution. Format is widthxheight, such as "800x600".

        When both image_size_selector and image_resolution are present, image_size_selector takes priority.

        If neither are present, all images will be returned.
        Parameters:
        imageResolutions - Specifies the image resolution.
      • setPagination

        public void setPagination​(PagingOption paging)
        Identifies the pagination parameter for the page offset and page size.

        The offset sets the number of items to skip in the result. The default is 0 items to skip. If this offset is negative, 0 will be used.

        If the offset is greater than the total amount of the matched data, nothing will be returned.

        The page size sets the maximum number of items to return in the result. The default is 150 items. For example: offset=60&page_size=15 - The first 60 items will be skipped. Items 61 to 75 will be returned, if available.
        Parameters:
        paging - pagination