opensearch-project / opensearch-php

Official PHP Client for OpenSearch
Other
109 stars 58 forks source link

[FEATURE] Update the Documentation #101

Closed harrowmykel closed 7 months ago

harrowmykel commented 2 years ago

Is your feature request related to a problem?

This is a very good library. Thanks for maintaining it. I found a problem. The Documentation is too old

https://github.com/opensearch-project/opensearch-php/blob/main/docs/build/OpenSearch/Client.asciidoc#OpenSearch_Clientindex_index

What solution would you like?

search(array $params = []) function does not show the following. Please add it. I just spent the last hour trying to write a lucene query instead of using body because i couldn't find it in the docs.

/*
* $params['stats']                         = (list) Specific 'tag' of the request for logging and statistical purposes
     * $params['suggest_field']                 = (string) Specify which field to use for suggestions
     * $params['suggest_mode']                  = (enum) Specify suggest mode (Options = missing,popular,always) (Default = missing)
     * $params['suggest_size']                  = (number) How many suggestions to return in response
     * $params['suggest_text']                  = (string) The source text for which the suggestions should be returned
     * $params['timeout']                       = (time) Explicit operation timeout
     * $params['track_scores']                  = (boolean) Whether to calculate and return scores even if they are not used for sorting
     * $params['track_total_hits']              = (boolean) Indicate if the number of documents that match the query should be tracked
     * $params['allow_partial_search_results']  = (boolean) Indicate if an error should be returned if there is a partial search failure or timeout (Default = true)
     * $params['typed_keys']                    = (boolean) Specify whether aggregation and suggester names should be prefixed by their respective types in the response
     * $params['version']                       = (boolean) Specify whether to return document version as part of a hit
     * $params['seq_no_primary_term']           = (boolean) Specify whether to return sequence number and primary term of the last modification of each hit
     * $params['request_cache']                 = (boolean) Specify if request cache should be used for this request or not, defaults to index level setting
     * $params['batched_reduce_size']           = (number) The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. (Default = 512)
     * $params['max_concurrent_shard_requests'] = (number) The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests (Default = 5)
     * $params['pre_filter_shard_size']         = (number) A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint.
     * $params['rest_total_hits_as_int']        = (boolean) Indicates whether hits.total should be rendered as an integer or an object in the rest search response (Default = false)
     * $params['body']
     * @param array $params Associative array of parameters
     * @return array
     * 
     * */

What alternatives have you considered?

-

Do you have any additional context?

-

wbeckler commented 2 years ago

@harrowmykel would you be up for composing a PR?

harrowmykel commented 2 years ago

Yes sure. No problem

On Thu, 17 Nov 2022, 07:46 William Beckler @.***> wrote:

@harrowmykel https://github.com/harrowmykel would you be up for composing a PR?

— Reply to this email directly, view it on GitHub https://github.com/opensearch-project/opensearch-php/issues/101#issuecomment-1318165252, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFLTOBPFZDELZS5BQYJKIF3WIXIFDANCNFSM6AAAAAASA2RKGE . You are receiving this because you were mentioned.Message ID: @.***>

dblock commented 7 months ago

The ASCII doc was removed, @shyim is there something to do from here still?

shyim commented 7 months ago

I would close it 🤔