Class MultiSearchRequest

    • Field Detail

      • MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT

        public static final int MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT
        See Also:
        Constant Field Values
    • Constructor Detail

      • MultiSearchRequest

        public MultiSearchRequest()
    • Method Detail

      • add

        public MultiSearchRequest add​(SearchRequestBuilder request)
        Add a search request to execute. Note, the order is important, the search response will be returned in the same order as the search requests.
      • add

        public MultiSearchRequest add​(SearchRequest request)
        Add a search request to execute. Note, the order is important, the search response will be returned in the same order as the search requests.
      • maxConcurrentSearchRequests

        public int maxConcurrentSearchRequests()
        Returns the amount of search requests specified in this multi search requests are allowed to be ran concurrently.
      • maxConcurrentSearchRequests

        public MultiSearchRequest maxConcurrentSearchRequests​(int maxConcurrentSearchRequests)
        Sets how many search requests specified in this multi search requests are allowed to be ran concurrently.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • writeMultiLineFormat

        public static byte[] writeMultiLineFormat​(MultiSearchRequest multiSearchRequest,
                                                  XContent xContent)
                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • writeSearchRequestParams

        public static void writeSearchRequestParams​(SearchRequest request,
                                                    XContentBuilder xContentBuilder)
                                             throws java.io.IOException
        Throws:
        java.io.IOException