Categorygithub.com/manticoresoftware/manticoresearch-go

# README

Go API client for openapi

Сlient for Manticore Search.

Overview

This API client was generated by the OpenAPI Generator project.

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import openapi "github.com/manticoresoftware/manticoresearch-go"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value openapi.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), openapi.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using openapi.ContextOperationServerIndices and openapi.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), openapi.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://127.0.0.1:9308

ClassMethodHTTP requestDescription
IndexAPIBulkPost /bulkBulk index operations
IndexAPIDeletePost /deleteDelete a document in an index
IndexAPIInsertPost /insertCreate a new document in an index
IndexAPIReplacePost /replaceReplace new document in an index
IndexAPIUpdatePost /updateUpdate a document in an index
SearchAPIPercolatePost /pq/{index}/searchPerform reverse search on a percolate index
SearchAPISearchPost /searchPerforms a search on an index
UtilsAPISqlPost /sqlPerform SQL requests

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

# Packages

No description provided by the author

# Functions

CacheExpires helper function to determine remaining time before repeating a request.
ErrorResponseAsSqlDefaultResponse is a convenience function that returns ErrorResponse wrapped in SqlDefaultResponse.
ErrorResponseStringAsSqlDefaultResponse is a convenience function that returns ErrorResponseString wrapped in SqlDefaultResponse.
IsNil checks if an input is nil.
NewAggregation instantiates a new Aggregation object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAggregationSortInnerValue instantiates a new AggregationSortInnerValue object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAggregationSortInnerValueWithDefaults instantiates a new AggregationSortInnerValue object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewAggregationTerms instantiates a new AggregationTerms object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAggregationTermsWithDefaults instantiates a new AggregationTerms object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewAggregationWithDefaults instantiates a new Aggregation object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewAPIClient creates a new API client.
NewAPIResponse returns a new APIResponse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewBoolFilter instantiates a new BoolFilter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBoolFilterWithDefaults instantiates a new BoolFilter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBulkResponse instantiates a new BulkResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBulkResponseWithDefaults instantiates a new BulkResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewConfiguration returns a new Configuration object.
NewDeleteDocumentRequest instantiates a new DeleteDocumentRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewDeleteDocumentRequestWithDefaults instantiates a new DeleteDocumentRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewDeleteResponse instantiates a new DeleteResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewDeleteResponseWithDefaults instantiates a new DeleteResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewEqualsFilter instantiates a new EqualsFilter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewEqualsFilterWithDefaults instantiates a new EqualsFilter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewErrorResponse instantiates a new ErrorResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorResponseString instantiates a new ErrorResponseString object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewErrorResponseStringWithDefaults instantiates a new ErrorResponseString object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewErrorResponseWithDefaults instantiates a new ErrorResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewFacet instantiates a new Facet object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewFacetWithDefaults instantiates a new Facet object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewFilterBoolean instantiates a new FilterBoolean object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewFilterBooleanWithDefaults instantiates a new FilterBoolean object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewFilterNumber instantiates a new FilterNumber object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewFilterNumberWithDefaults instantiates a new FilterNumber object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewFilterString instantiates a new FilterString object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewFilterStringWithDefaults instantiates a new FilterString object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewGeoDistanceFilter instantiates a new GeoDistanceFilter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewGeoDistanceFilterLocationAnchor instantiates a new GeoDistanceFilterLocationAnchor object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewGeoDistanceFilterLocationAnchorWithDefaults instantiates a new GeoDistanceFilterLocationAnchor object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewGeoDistanceFilterWithDefaults instantiates a new GeoDistanceFilter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewHighlight instantiates a new Highlight object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewHighlightField instantiates a new HighlightField object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewHighlightFieldWithDefaults instantiates a new HighlightField object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewHighlightWithDefaults instantiates a new Highlight object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewInFilter instantiates a new InFilter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewInFilterWithDefaults instantiates a new InFilter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewInsertDocumentRequest instantiates a new InsertDocumentRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewInsertDocumentRequestWithDefaults instantiates a new InsertDocumentRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewKnnSearchRequestByDocId instantiates a new KnnSearchRequestByDocId object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewKnnSearchRequestByDocIdWithDefaults instantiates a new KnnSearchRequestByDocId object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewKnnSearchRequestByVector instantiates a new KnnSearchRequestByVector object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewKnnSearchRequestByVectorWithDefaults instantiates a new KnnSearchRequestByVector object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewMatchFilter instantiates a new MatchFilter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewMatchFilterWithDefaults instantiates a new MatchFilter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewMatchOp instantiates a new MatchOp object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewMatchOpFilter instantiates a new MatchOpFilter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewMatchOpFilterWithDefaults instantiates a new MatchOpFilter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewMatchOpWithDefaults instantiates a new MatchOp object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewMatchPhraseFilter instantiates a new MatchPhraseFilter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewMatchPhraseFilterWithDefaults instantiates a new MatchPhraseFilter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewNotFilterBoolean instantiates a new NotFilterBoolean object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewNotFilterBooleanWithDefaults instantiates a new NotFilterBoolean object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewNotFilterNumber instantiates a new NotFilterNumber object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewNotFilterNumberWithDefaults instantiates a new NotFilterNumber object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewNotFilterString instantiates a new NotFilterString object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewNotFilterStringWithDefaults instantiates a new NotFilterString object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPercolateRequest instantiates a new PercolateRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPercolateRequestQuery instantiates a new PercolateRequestQuery object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewPercolateRequestQueryWithDefaults instantiates a new PercolateRequestQuery object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewPercolateRequestWithDefaults instantiates a new PercolateRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewQueryFilter instantiates a new QueryFilter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewQueryFilterWithDefaults instantiates a new QueryFilter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRangeFilter instantiates a new RangeFilter object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRangeFilterWithDefaults instantiates a new RangeFilter object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewSearchRequest instantiates a new SearchRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewSearchRequestWithDefaults instantiates a new SearchRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewSearchResponse instantiates a new SearchResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewSearchResponseHits instantiates a new SearchResponseHits object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewSearchResponseHitsWithDefaults instantiates a new SearchResponseHits object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewSearchResponseWithDefaults instantiates a new SearchResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewSortMultiple instantiates a new SortMultiple object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewSortMultipleWithDefaults instantiates a new SortMultiple object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewSortMVA instantiates a new SortMVA object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewSortMVAWithDefaults instantiates a new SortMVA object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewSortOrder instantiates a new SortOrder object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewSortOrderWithDefaults instantiates a new SortOrder object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewSourceByRules instantiates a new SourceByRules object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewSourceByRulesWithDefaults instantiates a new SourceByRules object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewSuccessResponse instantiates a new SuccessResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewSuccessResponseWithDefaults instantiates a new SuccessResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUpdateDocumentRequest instantiates a new UpdateDocumentRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUpdateDocumentRequestWithDefaults instantiates a new UpdateDocumentRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewUpdateResponse instantiates a new UpdateResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewUpdateResponseWithDefaults instantiates a new UpdateResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
PtrBool is a helper routine that returns a pointer to given boolean value.
PtrFloat32 is a helper routine that returns a pointer to given float value.
PtrFloat64 is a helper routine that returns a pointer to given float value.
PtrInt is a helper routine that returns a pointer to given integer value.
PtrInt32 is a helper routine that returns a pointer to given integer value.
PtrInt64 is a helper routine that returns a pointer to given integer value.
PtrString is a helper routine that returns a pointer to given string value.
PtrTime is helper routine that returns a pointer to given Time value.

# Variables

ContextOperationServerIndices uses a server configuration from the index mapping.
ContextOperationServerVariables overrides a server configuration variables using operation specific values.
ContextServerIndex uses a server configuration from the index.
ContextServerVariables overrides a server configuration variables.
No description provided by the author
No description provided by the author

# Structs

Aggregation Aggregation Alias.
AggregationSortInnerValue struct for AggregationSortInnerValue.
AggregationTerms struct for AggregationTerms.
No description provided by the author
APIClient manages communication with the Manticore Search Client API v3.3.1 In most cases there should be only one, shared, APIClient.
No description provided by the author
No description provided by the author
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
No description provided by the author
No description provided by the author
APIResponse stores the API response returned by the server.
No description provided by the author
No description provided by the author
No description provided by the author
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
BoolFilter Boolean attribute filter.
BulkResponse Success bulk response.
Configuration stores the configuration of the API client.
DeleteDocumentRequest Payload for delete request.
DeleteResponse Success response.
EqualsFilter Equals attribute filter.
ErrorResponse Error response.
ErrorResponseString Error response.
Facet Query FACET expression.
FilterBoolean Query filter.
FilterNumber Query filter.
FilterString Query filter.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
GeoDistanceFilter Geo distance attribute filter.
GeoDistanceFilterLocationAnchor Geo pin point object.
Highlight Query HIGHLIGHT expression.
HighlightField Query Highlight field with options set.
InFilter In attribute filter.
InsertDocumentRequest Object with document data.
KnnSearchRequestByDocId Request object for knn search operation.
KnnSearchRequestByVector Request object for knn search operation.
MatchFilter Query match filter.
MatchOp Query match expression with logical operator.
MatchOpFilter Query match expression.
MatchPhraseFilter Query match expression.
NotFilterBoolean Query filter.
NotFilterNumber Query filter.
NotFilterString Query filter.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PercolateRequest Object with documents to percolate.
PercolateRequestQuery struct for PercolateRequestQuery.
QueryFilter Query string filter.
RangeFilter Range attribute filter.
SearchRequest Request object for search operation.
SearchResponse Response object of a search request.
SearchResponseHits struct for SearchResponseHits.
ServerConfiguration stores the information about a server.
ServerVariable stores the information about a server variable.
SortMultiple Query sort expression for multiple attributes.
SortMVA Query sort expression for MVA attributes.
SortOrder Query sort expression.
SourceByRules Query fields to be included/excluded to/from response.
SqlDefaultResponse - struct for SqlDefaultResponse.
SuccessResponse Success response.
UpdateDocumentRequest Payload for update document.
UpdateResponse Success response.

# Interfaces

No description provided by the author

# Type aliases

IndexAPIService IndexAPI service.
SearchAPIService SearchAPI service.
ServerConfigurations stores multiple ServerConfiguration items.
UtilsAPIService UtilsAPI service.