Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.3 DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.13.3 DO NOT EDIT.
Index ¶
- Constants
- func NewCreateCollectionRequest(server string, body CreateCollectionJSONRequestBody) (*http.Request, error)
- func NewCreateCollectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateKeyRequest(server string, body CreateKeyJSONRequestBody) (*http.Request, error)
- func NewCreateKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDebugRequest(server string) (*http.Request, error)
- func NewDeleteAliasRequest(server string, aliasName string) (*http.Request, error)
- func NewDeleteCollectionRequest(server string, collectionName string) (*http.Request, error)
- func NewDeleteDocumentRequest(server string, collectionName string, documentId string) (*http.Request, error)
- func NewDeleteDocumentsRequest(server string, collectionName string, params *DeleteDocumentsParams) (*http.Request, error)
- func NewDeleteKeyRequest(server string, keyId int64) (*http.Request, error)
- func NewDeleteSearchOverrideRequest(server string, collectionName string, overrideId string) (*http.Request, error)
- func NewDeleteSearchSynonymRequest(server string, collectionName string, synonymId string) (*http.Request, error)
- func NewExportDocumentsRequest(server string, collectionName string, params *ExportDocumentsParams) (*http.Request, error)
- func NewGetAliasRequest(server string, aliasName string) (*http.Request, error)
- func NewGetAliasesRequest(server string) (*http.Request, error)
- func NewGetCollectionRequest(server string, collectionName string) (*http.Request, error)
- func NewGetCollectionsRequest(server string) (*http.Request, error)
- func NewGetDocumentRequest(server string, collectionName string, documentId string) (*http.Request, error)
- func NewGetKeyRequest(server string, keyId int64) (*http.Request, error)
- func NewGetKeysRequest(server string) (*http.Request, error)
- func NewGetSearchOverrideRequest(server string, collectionName string, overrideId string) (*http.Request, error)
- func NewGetSearchOverridesRequest(server string, collectionName string) (*http.Request, error)
- func NewGetSearchSynonymRequest(server string, collectionName string, synonymId string) (*http.Request, error)
- func NewGetSearchSynonymsRequest(server string, collectionName string) (*http.Request, error)
- func NewHealthRequest(server string) (*http.Request, error)
- func NewImportDocumentsRequestWithBody(server string, collectionName string, params *ImportDocumentsParams, ...) (*http.Request, error)
- func NewIndexDocumentRequest(server string, collectionName string, params *IndexDocumentParams, ...) (*http.Request, error)
- func NewIndexDocumentRequestWithBody(server string, collectionName string, params *IndexDocumentParams, ...) (*http.Request, error)
- func NewMultiSearchRequest(server string, params *MultiSearchParams, body MultiSearchJSONRequestBody) (*http.Request, error)
- func NewMultiSearchRequestWithBody(server string, params *MultiSearchParams, contentType string, body io.Reader) (*http.Request, error)
- func NewSearchCollectionRequest(server string, collectionName string, params *SearchCollectionParams) (*http.Request, error)
- func NewTakeSnapshotRequest(server string, params *TakeSnapshotParams) (*http.Request, error)
- func NewUpdateCollectionRequest(server string, collectionName string, body UpdateCollectionJSONRequestBody) (*http.Request, error)
- func NewUpdateCollectionRequestWithBody(server string, collectionName string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateDocumentRequest(server string, collectionName string, documentId string, ...) (*http.Request, error)
- func NewUpdateDocumentRequestWithBody(server string, collectionName string, documentId string, contentType string, ...) (*http.Request, error)
- func NewUpdateDocumentsRequest(server string, collectionName string, params *UpdateDocumentsParams, ...) (*http.Request, error)
- func NewUpdateDocumentsRequestWithBody(server string, collectionName string, params *UpdateDocumentsParams, ...) (*http.Request, error)
- func NewUpsertAliasRequest(server string, aliasName string, body UpsertAliasJSONRequestBody) (*http.Request, error)
- func NewUpsertAliasRequestWithBody(server string, aliasName string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpsertSearchOverrideRequest(server string, collectionName string, overrideId string, ...) (*http.Request, error)
- func NewUpsertSearchOverrideRequestWithBody(server string, collectionName string, overrideId string, contentType string, ...) (*http.Request, error)
- func NewUpsertSearchSynonymRequest(server string, collectionName string, synonymId string, ...) (*http.Request, error)
- func NewUpsertSearchSynonymRequestWithBody(server string, collectionName string, synonymId string, contentType string, ...) (*http.Request, error)
- func NewVoteRequest(server string) (*http.Request, error)
- type ApiKey
- type ApiKeySchema
- type ApiKeysResponse
- type ApiResponse
- type Client
- func (c *Client) CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateCollectionWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateKey(ctx context.Context, body CreateKeyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateKeyWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) Debug(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteAlias(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteDocument(ctx context.Context, collectionName string, documentId string, ...) (*http.Response, error)
- func (c *Client) DeleteDocuments(ctx context.Context, collectionName string, params *DeleteDocumentsParams, ...) (*http.Response, error)
- func (c *Client) DeleteKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) DeleteSearchOverride(ctx context.Context, collectionName string, overrideId string, ...) (*http.Response, error)
- func (c *Client) DeleteSearchSynonym(ctx context.Context, collectionName string, synonymId string, ...) (*http.Response, error)
- func (c *Client) ExportDocuments(ctx context.Context, collectionName string, params *ExportDocumentsParams, ...) (*http.Response, error)
- func (c *Client) GetAlias(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetAliases(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetDocument(ctx context.Context, collectionName string, documentId string, ...) (*http.Response, error)
- func (c *Client) GetKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSearchOverride(ctx context.Context, collectionName string, overrideId string, ...) (*http.Response, error)
- func (c *Client) GetSearchOverrides(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetSearchSynonym(ctx context.Context, collectionName string, synonymId string, ...) (*http.Response, error)
- func (c *Client) GetSearchSynonyms(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ImportDocumentsWithBody(ctx context.Context, collectionName string, params *ImportDocumentsParams, ...) (*http.Response, error)
- func (c *Client) IndexDocument(ctx context.Context, collectionName string, params *IndexDocumentParams, ...) (*http.Response, error)
- func (c *Client) IndexDocumentWithBody(ctx context.Context, collectionName string, params *IndexDocumentParams, ...) (*http.Response, error)
- func (c *Client) MultiSearch(ctx context.Context, params *MultiSearchParams, ...) (*http.Response, error)
- func (c *Client) MultiSearchWithBody(ctx context.Context, params *MultiSearchParams, contentType string, ...) (*http.Response, error)
- func (c *Client) SearchCollection(ctx context.Context, collectionName string, params *SearchCollectionParams, ...) (*http.Response, error)
- func (c *Client) TakeSnapshot(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) UpdateCollection(ctx context.Context, collectionName string, ...) (*http.Response, error)
- func (c *Client) UpdateCollectionWithBody(ctx context.Context, collectionName string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateDocument(ctx context.Context, collectionName string, documentId string, ...) (*http.Response, error)
- func (c *Client) UpdateDocumentWithBody(ctx context.Context, collectionName string, documentId string, ...) (*http.Response, error)
- func (c *Client) UpdateDocuments(ctx context.Context, collectionName string, params *UpdateDocumentsParams, ...) (*http.Response, error)
- func (c *Client) UpdateDocumentsWithBody(ctx context.Context, collectionName string, params *UpdateDocumentsParams, ...) (*http.Response, error)
- func (c *Client) UpsertAlias(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) UpsertAliasWithBody(ctx context.Context, aliasName string, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpsertSearchOverride(ctx context.Context, collectionName string, overrideId string, ...) (*http.Response, error)
- func (c *Client) UpsertSearchOverrideWithBody(ctx context.Context, collectionName string, overrideId string, ...) (*http.Response, error)
- func (c *Client) UpsertSearchSynonym(ctx context.Context, collectionName string, synonymId string, ...) (*http.Response, error)
- func (c *Client) UpsertSearchSynonymWithBody(ctx context.Context, collectionName string, synonymId string, ...) (*http.Response, error)
- func (c *Client) Vote(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateCollectionResponse, error)
- func (c *ClientWithResponses) CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, ...) (*CreateCollectionResponse, error)
- func (c *ClientWithResponses) CreateKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateKeyResponse, error)
- func (c *ClientWithResponses) CreateKeyWithResponse(ctx context.Context, body CreateKeyJSONRequestBody, ...) (*CreateKeyResponse, error)
- func (c *ClientWithResponses) DebugWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DebugResponse, error)
- func (c *ClientWithResponses) DeleteAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*DeleteAliasResponse, error)
- func (c *ClientWithResponses) DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error)
- func (c *ClientWithResponses) DeleteDocumentWithResponse(ctx context.Context, collectionName string, documentId string, ...) (*DeleteDocumentResponse, error)
- func (c *ClientWithResponses) DeleteDocumentsWithResponse(ctx context.Context, collectionName string, params *DeleteDocumentsParams, ...) (*DeleteDocumentsResponse, error)
- func (c *ClientWithResponses) DeleteKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error)
- func (c *ClientWithResponses) DeleteSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, ...) (*DeleteSearchOverrideResponse, error)
- func (c *ClientWithResponses) DeleteSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, ...) (*DeleteSearchSynonymResponse, error)
- func (c *ClientWithResponses) ExportDocumentsWithResponse(ctx context.Context, collectionName string, params *ExportDocumentsParams, ...) (*ExportDocumentsResponse, error)
- func (c *ClientWithResponses) GetAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*GetAliasResponse, error)
- func (c *ClientWithResponses) GetAliasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAliasesResponse, error)
- func (c *ClientWithResponses) GetCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetCollectionResponse, error)
- func (c *ClientWithResponses) GetCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCollectionsResponse, error)
- func (c *ClientWithResponses) GetDocumentWithResponse(ctx context.Context, collectionName string, documentId string, ...) (*GetDocumentResponse, error)
- func (c *ClientWithResponses) GetKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*GetKeyResponse, error)
- func (c *ClientWithResponses) GetKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetKeysResponse, error)
- func (c *ClientWithResponses) GetSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, ...) (*GetSearchOverrideResponse, error)
- func (c *ClientWithResponses) GetSearchOverridesWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchOverridesResponse, error)
- func (c *ClientWithResponses) GetSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, ...) (*GetSearchSynonymResponse, error)
- func (c *ClientWithResponses) GetSearchSynonymsWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchSynonymsResponse, error)
- func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)
- func (c *ClientWithResponses) ImportDocumentsWithBodyWithResponse(ctx context.Context, collectionName string, params *ImportDocumentsParams, ...) (*ImportDocumentsResponse, error)
- func (c *ClientWithResponses) IndexDocumentWithBodyWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, ...) (*IndexDocumentResponse, error)
- func (c *ClientWithResponses) IndexDocumentWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, ...) (*IndexDocumentResponse, error)
- func (c *ClientWithResponses) MultiSearchWithBodyWithResponse(ctx context.Context, params *MultiSearchParams, contentType string, ...) (*MultiSearchResponse, error)
- func (c *ClientWithResponses) MultiSearchWithResponse(ctx context.Context, params *MultiSearchParams, ...) (*MultiSearchResponse, error)
- func (c *ClientWithResponses) SearchCollectionWithResponse(ctx context.Context, collectionName string, params *SearchCollectionParams, ...) (*SearchCollectionResponse, error)
- func (c *ClientWithResponses) TakeSnapshotWithResponse(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*TakeSnapshotResponse, error)
- func (c *ClientWithResponses) UpdateCollectionWithBodyWithResponse(ctx context.Context, collectionName string, contentType string, body io.Reader, ...) (*UpdateCollectionResponse, error)
- func (c *ClientWithResponses) UpdateCollectionWithResponse(ctx context.Context, collectionName string, ...) (*UpdateCollectionResponse, error)
- func (c *ClientWithResponses) UpdateDocumentWithBodyWithResponse(ctx context.Context, collectionName string, documentId string, ...) (*UpdateDocumentResponse, error)
- func (c *ClientWithResponses) UpdateDocumentWithResponse(ctx context.Context, collectionName string, documentId string, ...) (*UpdateDocumentResponse, error)
- func (c *ClientWithResponses) UpdateDocumentsWithBodyWithResponse(ctx context.Context, collectionName string, params *UpdateDocumentsParams, ...) (*UpdateDocumentsResponse, error)
- func (c *ClientWithResponses) UpdateDocumentsWithResponse(ctx context.Context, collectionName string, params *UpdateDocumentsParams, ...) (*UpdateDocumentsResponse, error)
- func (c *ClientWithResponses) UpsertAliasWithBodyWithResponse(ctx context.Context, aliasName string, contentType string, body io.Reader, ...) (*UpsertAliasResponse, error)
- func (c *ClientWithResponses) UpsertAliasWithResponse(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, ...) (*UpsertAliasResponse, error)
- func (c *ClientWithResponses) UpsertSearchOverrideWithBodyWithResponse(ctx context.Context, collectionName string, overrideId string, ...) (*UpsertSearchOverrideResponse, error)
- func (c *ClientWithResponses) UpsertSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, ...) (*UpsertSearchOverrideResponse, error)
- func (c *ClientWithResponses) UpsertSearchSynonymWithBodyWithResponse(ctx context.Context, collectionName string, synonymId string, ...) (*UpsertSearchSynonymResponse, error)
- func (c *ClientWithResponses) UpsertSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, ...) (*UpsertSearchSynonymResponse, error)
- func (c *ClientWithResponses) VoteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*VoteResponse, error)
- type ClientWithResponsesInterface
- type CollectionAlias
- type CollectionAliasSchema
- type CollectionAliasesResponse
- type CollectionResponse
- type CollectionSchema
- type CollectionUpdateSchema
- type CreateCollectionJSONRequestBody
- type CreateCollectionResponse
- type CreateKeyJSONRequestBody
- type CreateKeyResponse
- type DebugResponse
- type DeleteAliasResponse
- type DeleteCollectionResponse
- type DeleteDocumentResponse
- type DeleteDocumentsParams
- type DeleteDocumentsResponse
- type DeleteKeyResponse
- type DeleteSearchOverrideResponse
- type DeleteSearchSynonymResponse
- type ExportDocumentsParams
- type ExportDocumentsResponse
- type FacetCounts
- type Field
- type GetAliasResponse
- type GetAliasesResponse
- type GetCollectionResponse
- type GetCollectionsResponse
- type GetDocumentResponse
- type GetKeyResponse
- type GetKeysResponse
- type GetSearchOverrideResponse
- type GetSearchOverridesResponse
- type GetSearchSynonymResponse
- type GetSearchSynonymsResponse
- type HealthResponse
- type HealthStatus
- type HttpRequestDoer
- type ImportDocumentResponse
- type ImportDocumentsParams
- type ImportDocumentsParamsDirtyValues
- type ImportDocumentsResponse
- type IndexDocumentJSONBody
- type IndexDocumentJSONRequestBody
- type IndexDocumentParams
- type IndexDocumentParamsAction
- type IndexDocumentResponse
- type MultiSearchCollectionParameters
- type MultiSearchJSONRequestBody
- type MultiSearchParameters
- type MultiSearchParams
- type MultiSearchResponse
- type MultiSearchResult
- type MultiSearchSearchesParameter
- type RequestEditorFn
- type SearchCollectionParams
- type SearchCollectionResponse
- type SearchGroupedHit
- type SearchHighlight
- type SearchOverride
- type SearchOverrideExclude
- type SearchOverrideInclude
- type SearchOverrideRule
- type SearchOverrideRuleMatch
- type SearchOverrideSchema
- type SearchOverridesResponse
- type SearchResult
- type SearchResultHit
- type SearchSynonym
- type SearchSynonymSchema
- type SearchSynonymsResponse
- type SuccessStatus
- type TakeSnapshotParams
- type TakeSnapshotResponse
- type UpdateCollectionJSONRequestBody
- type UpdateCollectionResponse
- type UpdateDocumentJSONBody
- type UpdateDocumentJSONRequestBody
- type UpdateDocumentResponse
- type UpdateDocumentsJSONBody
- type UpdateDocumentsJSONRequestBody
- type UpdateDocumentsParams
- type UpdateDocumentsResponse
- type UpsertAliasJSONRequestBody
- type UpsertAliasResponse
- type UpsertSearchOverrideJSONRequestBody
- type UpsertSearchOverrideResponse
- type UpsertSearchSynonymJSONRequestBody
- type UpsertSearchSynonymResponse
- type VoteResponse
Constants ¶
const APIKeyHeader = "X-TYPESENSE-API-KEY"
const (
Api_key_headerScopes = "api_key_header.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewCreateCollectionRequest ¶
func NewCreateCollectionRequest(server string, body CreateCollectionJSONRequestBody) (*http.Request, error)
NewCreateCollectionRequest calls the generic CreateCollection builder with application/json body
func NewCreateCollectionRequestWithBody ¶
func NewCreateCollectionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateCollectionRequestWithBody generates requests for CreateCollection with any type of body
func NewCreateKeyRequest ¶
func NewCreateKeyRequest(server string, body CreateKeyJSONRequestBody) (*http.Request, error)
NewCreateKeyRequest calls the generic CreateKey builder with application/json body
func NewCreateKeyRequestWithBody ¶
func NewCreateKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateKeyRequestWithBody generates requests for CreateKey with any type of body
func NewDebugRequest ¶
NewDebugRequest generates requests for Debug
func NewDeleteAliasRequest ¶
NewDeleteAliasRequest generates requests for DeleteAlias
func NewDeleteCollectionRequest ¶
NewDeleteCollectionRequest generates requests for DeleteCollection
func NewDeleteDocumentRequest ¶
func NewDeleteDocumentRequest(server string, collectionName string, documentId string) (*http.Request, error)
NewDeleteDocumentRequest generates requests for DeleteDocument
func NewDeleteDocumentsRequest ¶
func NewDeleteDocumentsRequest(server string, collectionName string, params *DeleteDocumentsParams) (*http.Request, error)
NewDeleteDocumentsRequest generates requests for DeleteDocuments
func NewDeleteKeyRequest ¶
NewDeleteKeyRequest generates requests for DeleteKey
func NewDeleteSearchOverrideRequest ¶
func NewDeleteSearchOverrideRequest(server string, collectionName string, overrideId string) (*http.Request, error)
NewDeleteSearchOverrideRequest generates requests for DeleteSearchOverride
func NewDeleteSearchSynonymRequest ¶
func NewDeleteSearchSynonymRequest(server string, collectionName string, synonymId string) (*http.Request, error)
NewDeleteSearchSynonymRequest generates requests for DeleteSearchSynonym
func NewExportDocumentsRequest ¶
func NewExportDocumentsRequest(server string, collectionName string, params *ExportDocumentsParams) (*http.Request, error)
NewExportDocumentsRequest generates requests for ExportDocuments
func NewGetAliasRequest ¶
NewGetAliasRequest generates requests for GetAlias
func NewGetAliasesRequest ¶
NewGetAliasesRequest generates requests for GetAliases
func NewGetCollectionRequest ¶
NewGetCollectionRequest generates requests for GetCollection
func NewGetCollectionsRequest ¶
NewGetCollectionsRequest generates requests for GetCollections
func NewGetDocumentRequest ¶
func NewGetDocumentRequest(server string, collectionName string, documentId string) (*http.Request, error)
NewGetDocumentRequest generates requests for GetDocument
func NewGetKeyRequest ¶
NewGetKeyRequest generates requests for GetKey
func NewGetKeysRequest ¶
NewGetKeysRequest generates requests for GetKeys
func NewGetSearchOverrideRequest ¶
func NewGetSearchOverrideRequest(server string, collectionName string, overrideId string) (*http.Request, error)
NewGetSearchOverrideRequest generates requests for GetSearchOverride
func NewGetSearchOverridesRequest ¶
NewGetSearchOverridesRequest generates requests for GetSearchOverrides
func NewGetSearchSynonymRequest ¶
func NewGetSearchSynonymRequest(server string, collectionName string, synonymId string) (*http.Request, error)
NewGetSearchSynonymRequest generates requests for GetSearchSynonym
func NewGetSearchSynonymsRequest ¶
NewGetSearchSynonymsRequest generates requests for GetSearchSynonyms
func NewHealthRequest ¶
NewHealthRequest generates requests for Health
func NewImportDocumentsRequestWithBody ¶
func NewImportDocumentsRequestWithBody(server string, collectionName string, params *ImportDocumentsParams, contentType string, body io.Reader) (*http.Request, error)
NewImportDocumentsRequestWithBody generates requests for ImportDocuments with any type of body
func NewIndexDocumentRequest ¶
func NewIndexDocumentRequest(server string, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody) (*http.Request, error)
NewIndexDocumentRequest calls the generic IndexDocument builder with application/json body
func NewIndexDocumentRequestWithBody ¶
func NewIndexDocumentRequestWithBody(server string, collectionName string, params *IndexDocumentParams, contentType string, body io.Reader) (*http.Request, error)
NewIndexDocumentRequestWithBody generates requests for IndexDocument with any type of body
func NewMultiSearchRequest ¶
func NewMultiSearchRequest(server string, params *MultiSearchParams, body MultiSearchJSONRequestBody) (*http.Request, error)
NewMultiSearchRequest calls the generic MultiSearch builder with application/json body
func NewMultiSearchRequestWithBody ¶
func NewMultiSearchRequestWithBody(server string, params *MultiSearchParams, contentType string, body io.Reader) (*http.Request, error)
NewMultiSearchRequestWithBody generates requests for MultiSearch with any type of body
func NewSearchCollectionRequest ¶
func NewSearchCollectionRequest(server string, collectionName string, params *SearchCollectionParams) (*http.Request, error)
NewSearchCollectionRequest generates requests for SearchCollection
func NewTakeSnapshotRequest ¶
func NewTakeSnapshotRequest(server string, params *TakeSnapshotParams) (*http.Request, error)
NewTakeSnapshotRequest generates requests for TakeSnapshot
func NewUpdateCollectionRequest ¶
func NewUpdateCollectionRequest(server string, collectionName string, body UpdateCollectionJSONRequestBody) (*http.Request, error)
NewUpdateCollectionRequest calls the generic UpdateCollection builder with application/json body
func NewUpdateCollectionRequestWithBody ¶
func NewUpdateCollectionRequestWithBody(server string, collectionName string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateCollectionRequestWithBody generates requests for UpdateCollection with any type of body
func NewUpdateDocumentRequest ¶
func NewUpdateDocumentRequest(server string, collectionName string, documentId string, body UpdateDocumentJSONRequestBody) (*http.Request, error)
NewUpdateDocumentRequest calls the generic UpdateDocument builder with application/json body
func NewUpdateDocumentRequestWithBody ¶
func NewUpdateDocumentRequestWithBody(server string, collectionName string, documentId string, contentType string, body io.Reader) (*http.Request, error)
NewUpdateDocumentRequestWithBody generates requests for UpdateDocument with any type of body
func NewUpdateDocumentsRequest ¶
func NewUpdateDocumentsRequest(server string, collectionName string, params *UpdateDocumentsParams, body UpdateDocumentsJSONRequestBody) (*http.Request, error)
NewUpdateDocumentsRequest calls the generic UpdateDocuments builder with application/json body
func NewUpdateDocumentsRequestWithBody ¶
func NewUpdateDocumentsRequestWithBody(server string, collectionName string, params *UpdateDocumentsParams, contentType string, body io.Reader) (*http.Request, error)
NewUpdateDocumentsRequestWithBody generates requests for UpdateDocuments with any type of body
func NewUpsertAliasRequest ¶
func NewUpsertAliasRequest(server string, aliasName string, body UpsertAliasJSONRequestBody) (*http.Request, error)
NewUpsertAliasRequest calls the generic UpsertAlias builder with application/json body
func NewUpsertAliasRequestWithBody ¶
func NewUpsertAliasRequestWithBody(server string, aliasName string, contentType string, body io.Reader) (*http.Request, error)
NewUpsertAliasRequestWithBody generates requests for UpsertAlias with any type of body
func NewUpsertSearchOverrideRequest ¶
func NewUpsertSearchOverrideRequest(server string, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody) (*http.Request, error)
NewUpsertSearchOverrideRequest calls the generic UpsertSearchOverride builder with application/json body
func NewUpsertSearchOverrideRequestWithBody ¶
func NewUpsertSearchOverrideRequestWithBody(server string, collectionName string, overrideId string, contentType string, body io.Reader) (*http.Request, error)
NewUpsertSearchOverrideRequestWithBody generates requests for UpsertSearchOverride with any type of body
func NewUpsertSearchSynonymRequest ¶
func NewUpsertSearchSynonymRequest(server string, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody) (*http.Request, error)
NewUpsertSearchSynonymRequest calls the generic UpsertSearchSynonym builder with application/json body
func NewUpsertSearchSynonymRequestWithBody ¶
func NewUpsertSearchSynonymRequestWithBody(server string, collectionName string, synonymId string, contentType string, body io.Reader) (*http.Request, error)
NewUpsertSearchSynonymRequestWithBody generates requests for UpsertSearchSynonym with any type of body
Types ¶
type ApiKey ¶
type ApiKey struct { Actions []string `json:"actions"` Collections []string `json:"collections"` Description string `json:"description"` ExpiresAt *int64 `json:"expires_at,omitempty"` Id *int64 `json:"id,omitempty"` Value *string `json:"value,omitempty"` ValuePrefix *string `json:"value_prefix,omitempty"` }
ApiKey defines model for ApiKey.
type ApiKeySchema ¶
type ApiKeySchema struct { Actions []string `json:"actions"` Collections []string `json:"collections"` Description string `json:"description"` ExpiresAt *int64 `json:"expires_at,omitempty"` Value *string `json:"value,omitempty"` }
ApiKeySchema defines model for ApiKeySchema.
type ApiKeysResponse ¶
type ApiKeysResponse struct {
Keys []*ApiKey `json:"keys"`
}
ApiKeysResponse defines model for ApiKeysResponse.
type ApiResponse ¶
type ApiResponse struct {
Message string `json:"message"`
}
ApiResponse defines model for ApiResponse.
type Client ¶
type Client struct { // The endpoint of the server conforming to this interface, with scheme, // https://api.deepmap.com for example. This can contain a path relative // to the server, such as https://api.deepmap.com/dev-test, and all the // paths in the swagger spec will be appended to the server. Server string // Doer for performing requests, typically a *http.Client with any // customized settings, such as certificate chains. Client HttpRequestDoer // A list of callbacks for modifying requests which are generated before sending over // the network. RequestEditors []RequestEditorFn }
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateCollection ¶
func (c *Client) CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateCollectionWithBody ¶
func (*Client) CreateKey ¶
func (c *Client) CreateKey(ctx context.Context, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateKeyWithBody ¶
func (*Client) DeleteAlias ¶
func (*Client) DeleteCollection ¶
func (*Client) DeleteDocument ¶
func (*Client) DeleteDocuments ¶
func (c *Client) DeleteDocuments(ctx context.Context, collectionName string, params *DeleteDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) DeleteSearchOverride ¶
func (*Client) DeleteSearchSynonym ¶
func (*Client) ExportDocuments ¶
func (c *Client) ExportDocuments(ctx context.Context, collectionName string, params *ExportDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetAliases ¶
func (*Client) GetCollection ¶
func (*Client) GetCollections ¶
func (*Client) GetDocument ¶
func (*Client) GetSearchOverride ¶
func (*Client) GetSearchOverrides ¶
func (*Client) GetSearchSynonym ¶
func (*Client) GetSearchSynonyms ¶
func (*Client) ImportDocumentsWithBody ¶
func (*Client) IndexDocument ¶
func (c *Client) IndexDocument(ctx context.Context, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) IndexDocumentWithBody ¶
func (*Client) MultiSearch ¶
func (c *Client) MultiSearch(ctx context.Context, params *MultiSearchParams, body MultiSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) MultiSearchWithBody ¶
func (*Client) SearchCollection ¶
func (c *Client) SearchCollection(ctx context.Context, collectionName string, params *SearchCollectionParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) TakeSnapshot ¶
func (c *Client) TakeSnapshot(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateCollection ¶
func (c *Client) UpdateCollection(ctx context.Context, collectionName string, body UpdateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateCollectionWithBody ¶
func (*Client) UpdateDocument ¶
func (c *Client) UpdateDocument(ctx context.Context, collectionName string, documentId string, body UpdateDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateDocumentWithBody ¶
func (*Client) UpdateDocuments ¶
func (c *Client) UpdateDocuments(ctx context.Context, collectionName string, params *UpdateDocumentsParams, body UpdateDocumentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpdateDocumentsWithBody ¶
func (*Client) UpsertAlias ¶
func (c *Client) UpsertAlias(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpsertAliasWithBody ¶
func (*Client) UpsertSearchOverride ¶
func (c *Client) UpsertSearchOverride(ctx context.Context, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpsertSearchOverrideWithBody ¶
func (*Client) UpsertSearchSynonym ¶
func (c *Client) UpsertSearchSynonym(ctx context.Context, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) UpsertSearchSynonymWithBody ¶
type ClientInterface ¶
type ClientInterface interface { // GetAliases request GetAliases(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteAlias request DeleteAlias(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAlias request GetAlias(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpsertAliasWithBody request with any body UpsertAliasWithBody(ctx context.Context, aliasName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpsertAlias(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetCollections request GetCollections(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateCollectionWithBody request with any body CreateCollectionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateCollection(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteCollection request DeleteCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetCollection request GetCollection(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateCollectionWithBody request with any body UpdateCollectionWithBody(ctx context.Context, collectionName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateCollection(ctx context.Context, collectionName string, body UpdateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteDocuments request DeleteDocuments(ctx context.Context, collectionName string, params *DeleteDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateDocumentsWithBody request with any body UpdateDocumentsWithBody(ctx context.Context, collectionName string, params *UpdateDocumentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateDocuments(ctx context.Context, collectionName string, params *UpdateDocumentsParams, body UpdateDocumentsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // IndexDocumentWithBody request with any body IndexDocumentWithBody(ctx context.Context, collectionName string, params *IndexDocumentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) IndexDocument(ctx context.Context, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ExportDocuments request ExportDocuments(ctx context.Context, collectionName string, params *ExportDocumentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // ImportDocumentsWithBody request with any body ImportDocumentsWithBody(ctx context.Context, collectionName string, params *ImportDocumentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) // SearchCollection request SearchCollection(ctx context.Context, collectionName string, params *SearchCollectionParams, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteDocument request DeleteDocument(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetDocument request GetDocument(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateDocumentWithBody request with any body UpdateDocumentWithBody(ctx context.Context, collectionName string, documentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpdateDocument(ctx context.Context, collectionName string, documentId string, body UpdateDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSearchOverrides request GetSearchOverrides(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteSearchOverride request DeleteSearchOverride(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSearchOverride request GetSearchOverride(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpsertSearchOverrideWithBody request with any body UpsertSearchOverrideWithBody(ctx context.Context, collectionName string, overrideId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpsertSearchOverride(ctx context.Context, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSearchSynonyms request GetSearchSynonyms(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteSearchSynonym request DeleteSearchSynonym(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSearchSynonym request GetSearchSynonym(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*http.Response, error) // UpsertSearchSynonymWithBody request with any body UpsertSearchSynonymWithBody(ctx context.Context, collectionName string, synonymId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) UpsertSearchSynonym(ctx context.Context, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // Debug request Debug(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // Health request Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // GetKeys request GetKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateKeyWithBody request with any body CreateKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) CreateKey(ctx context.Context, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // DeleteKey request DeleteKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error) // GetKey request GetKey(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*http.Response, error) // MultiSearchWithBody request with any body MultiSearchWithBody(ctx context.Context, params *MultiSearchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) MultiSearch(ctx context.Context, params *MultiSearchParams, body MultiSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // TakeSnapshot request TakeSnapshot(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*http.Response, error) // Vote request Vote(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) }
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithAPIKey ¶
func WithAPIKey(apiKey string) ClientOption
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateCollectionWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
CreateCollectionWithBodyWithResponse request with arbitrary body returning *CreateCollectionResponse
func (*ClientWithResponses) CreateCollectionWithResponse ¶
func (c *ClientWithResponses) CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error)
func (*ClientWithResponses) CreateKeyWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error)
CreateKeyWithBodyWithResponse request with arbitrary body returning *CreateKeyResponse
func (*ClientWithResponses) CreateKeyWithResponse ¶
func (c *ClientWithResponses) CreateKeyWithResponse(ctx context.Context, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error)
func (*ClientWithResponses) DebugWithResponse ¶
func (c *ClientWithResponses) DebugWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DebugResponse, error)
DebugWithResponse request returning *DebugResponse
func (*ClientWithResponses) DeleteAliasWithResponse ¶
func (c *ClientWithResponses) DeleteAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*DeleteAliasResponse, error)
DeleteAliasWithResponse request returning *DeleteAliasResponse
func (*ClientWithResponses) DeleteCollectionWithResponse ¶
func (c *ClientWithResponses) DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error)
DeleteCollectionWithResponse request returning *DeleteCollectionResponse
func (*ClientWithResponses) DeleteDocumentWithResponse ¶
func (c *ClientWithResponses) DeleteDocumentWithResponse(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*DeleteDocumentResponse, error)
DeleteDocumentWithResponse request returning *DeleteDocumentResponse
func (*ClientWithResponses) DeleteDocumentsWithResponse ¶
func (c *ClientWithResponses) DeleteDocumentsWithResponse(ctx context.Context, collectionName string, params *DeleteDocumentsParams, reqEditors ...RequestEditorFn) (*DeleteDocumentsResponse, error)
DeleteDocumentsWithResponse request returning *DeleteDocumentsResponse
func (*ClientWithResponses) DeleteKeyWithResponse ¶
func (c *ClientWithResponses) DeleteKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error)
DeleteKeyWithResponse request returning *DeleteKeyResponse
func (*ClientWithResponses) DeleteSearchOverrideWithResponse ¶
func (c *ClientWithResponses) DeleteSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*DeleteSearchOverrideResponse, error)
DeleteSearchOverrideWithResponse request returning *DeleteSearchOverrideResponse
func (*ClientWithResponses) DeleteSearchSynonymWithResponse ¶
func (c *ClientWithResponses) DeleteSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*DeleteSearchSynonymResponse, error)
DeleteSearchSynonymWithResponse request returning *DeleteSearchSynonymResponse
func (*ClientWithResponses) ExportDocumentsWithResponse ¶
func (c *ClientWithResponses) ExportDocumentsWithResponse(ctx context.Context, collectionName string, params *ExportDocumentsParams, reqEditors ...RequestEditorFn) (*ExportDocumentsResponse, error)
ExportDocumentsWithResponse request returning *ExportDocumentsResponse
func (*ClientWithResponses) GetAliasWithResponse ¶
func (c *ClientWithResponses) GetAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*GetAliasResponse, error)
GetAliasWithResponse request returning *GetAliasResponse
func (*ClientWithResponses) GetAliasesWithResponse ¶
func (c *ClientWithResponses) GetAliasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAliasesResponse, error)
GetAliasesWithResponse request returning *GetAliasesResponse
func (*ClientWithResponses) GetCollectionWithResponse ¶
func (c *ClientWithResponses) GetCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetCollectionResponse, error)
GetCollectionWithResponse request returning *GetCollectionResponse
func (*ClientWithResponses) GetCollectionsWithResponse ¶
func (c *ClientWithResponses) GetCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCollectionsResponse, error)
GetCollectionsWithResponse request returning *GetCollectionsResponse
func (*ClientWithResponses) GetDocumentWithResponse ¶
func (c *ClientWithResponses) GetDocumentWithResponse(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error)
GetDocumentWithResponse request returning *GetDocumentResponse
func (*ClientWithResponses) GetKeyWithResponse ¶
func (c *ClientWithResponses) GetKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*GetKeyResponse, error)
GetKeyWithResponse request returning *GetKeyResponse
func (*ClientWithResponses) GetKeysWithResponse ¶
func (c *ClientWithResponses) GetKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetKeysResponse, error)
GetKeysWithResponse request returning *GetKeysResponse
func (*ClientWithResponses) GetSearchOverrideWithResponse ¶
func (c *ClientWithResponses) GetSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*GetSearchOverrideResponse, error)
GetSearchOverrideWithResponse request returning *GetSearchOverrideResponse
func (*ClientWithResponses) GetSearchOverridesWithResponse ¶
func (c *ClientWithResponses) GetSearchOverridesWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchOverridesResponse, error)
GetSearchOverridesWithResponse request returning *GetSearchOverridesResponse
func (*ClientWithResponses) GetSearchSynonymWithResponse ¶
func (c *ClientWithResponses) GetSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*GetSearchSynonymResponse, error)
GetSearchSynonymWithResponse request returning *GetSearchSynonymResponse
func (*ClientWithResponses) GetSearchSynonymsWithResponse ¶
func (c *ClientWithResponses) GetSearchSynonymsWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchSynonymsResponse, error)
GetSearchSynonymsWithResponse request returning *GetSearchSynonymsResponse
func (*ClientWithResponses) HealthWithResponse ¶
func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)
HealthWithResponse request returning *HealthResponse
func (*ClientWithResponses) ImportDocumentsWithBodyWithResponse ¶
func (c *ClientWithResponses) ImportDocumentsWithBodyWithResponse(ctx context.Context, collectionName string, params *ImportDocumentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImportDocumentsResponse, error)
ImportDocumentsWithBodyWithResponse request with arbitrary body returning *ImportDocumentsResponse
func (*ClientWithResponses) IndexDocumentWithBodyWithResponse ¶
func (c *ClientWithResponses) IndexDocumentWithBodyWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IndexDocumentResponse, error)
IndexDocumentWithBodyWithResponse request with arbitrary body returning *IndexDocumentResponse
func (*ClientWithResponses) IndexDocumentWithResponse ¶
func (c *ClientWithResponses) IndexDocumentWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*IndexDocumentResponse, error)
func (*ClientWithResponses) MultiSearchWithBodyWithResponse ¶
func (c *ClientWithResponses) MultiSearchWithBodyWithResponse(ctx context.Context, params *MultiSearchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MultiSearchResponse, error)
MultiSearchWithBodyWithResponse request with arbitrary body returning *MultiSearchResponse
func (*ClientWithResponses) MultiSearchWithResponse ¶
func (c *ClientWithResponses) MultiSearchWithResponse(ctx context.Context, params *MultiSearchParams, body MultiSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*MultiSearchResponse, error)
func (*ClientWithResponses) SearchCollectionWithResponse ¶
func (c *ClientWithResponses) SearchCollectionWithResponse(ctx context.Context, collectionName string, params *SearchCollectionParams, reqEditors ...RequestEditorFn) (*SearchCollectionResponse, error)
SearchCollectionWithResponse request returning *SearchCollectionResponse
func (*ClientWithResponses) TakeSnapshotWithResponse ¶
func (c *ClientWithResponses) TakeSnapshotWithResponse(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*TakeSnapshotResponse, error)
TakeSnapshotWithResponse request returning *TakeSnapshotResponse
func (*ClientWithResponses) UpdateCollectionWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateCollectionWithBodyWithResponse(ctx context.Context, collectionName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCollectionResponse, error)
UpdateCollectionWithBodyWithResponse request with arbitrary body returning *UpdateCollectionResponse
func (*ClientWithResponses) UpdateCollectionWithResponse ¶
func (c *ClientWithResponses) UpdateCollectionWithResponse(ctx context.Context, collectionName string, body UpdateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCollectionResponse, error)
func (*ClientWithResponses) UpdateDocumentWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateDocumentWithBodyWithResponse(ctx context.Context, collectionName string, documentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDocumentResponse, error)
UpdateDocumentWithBodyWithResponse request with arbitrary body returning *UpdateDocumentResponse
func (*ClientWithResponses) UpdateDocumentWithResponse ¶
func (c *ClientWithResponses) UpdateDocumentWithResponse(ctx context.Context, collectionName string, documentId string, body UpdateDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDocumentResponse, error)
func (*ClientWithResponses) UpdateDocumentsWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateDocumentsWithBodyWithResponse(ctx context.Context, collectionName string, params *UpdateDocumentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDocumentsResponse, error)
UpdateDocumentsWithBodyWithResponse request with arbitrary body returning *UpdateDocumentsResponse
func (*ClientWithResponses) UpdateDocumentsWithResponse ¶
func (c *ClientWithResponses) UpdateDocumentsWithResponse(ctx context.Context, collectionName string, params *UpdateDocumentsParams, body UpdateDocumentsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDocumentsResponse, error)
func (*ClientWithResponses) UpsertAliasWithBodyWithResponse ¶
func (c *ClientWithResponses) UpsertAliasWithBodyWithResponse(ctx context.Context, aliasName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertAliasResponse, error)
UpsertAliasWithBodyWithResponse request with arbitrary body returning *UpsertAliasResponse
func (*ClientWithResponses) UpsertAliasWithResponse ¶
func (c *ClientWithResponses) UpsertAliasWithResponse(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertAliasResponse, error)
func (*ClientWithResponses) UpsertSearchOverrideWithBodyWithResponse ¶
func (c *ClientWithResponses) UpsertSearchOverrideWithBodyWithResponse(ctx context.Context, collectionName string, overrideId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertSearchOverrideResponse, error)
UpsertSearchOverrideWithBodyWithResponse request with arbitrary body returning *UpsertSearchOverrideResponse
func (*ClientWithResponses) UpsertSearchOverrideWithResponse ¶
func (c *ClientWithResponses) UpsertSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertSearchOverrideResponse, error)
func (*ClientWithResponses) UpsertSearchSynonymWithBodyWithResponse ¶
func (c *ClientWithResponses) UpsertSearchSynonymWithBodyWithResponse(ctx context.Context, collectionName string, synonymId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertSearchSynonymResponse, error)
UpsertSearchSynonymWithBodyWithResponse request with arbitrary body returning *UpsertSearchSynonymResponse
func (*ClientWithResponses) UpsertSearchSynonymWithResponse ¶
func (c *ClientWithResponses) UpsertSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertSearchSynonymResponse, error)
func (*ClientWithResponses) VoteWithResponse ¶
func (c *ClientWithResponses) VoteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*VoteResponse, error)
VoteWithResponse request returning *VoteResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // GetAliasesWithResponse request GetAliasesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAliasesResponse, error) // DeleteAliasWithResponse request DeleteAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*DeleteAliasResponse, error) // GetAliasWithResponse request GetAliasWithResponse(ctx context.Context, aliasName string, reqEditors ...RequestEditorFn) (*GetAliasResponse, error) // UpsertAliasWithBodyWithResponse request with any body UpsertAliasWithBodyWithResponse(ctx context.Context, aliasName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertAliasResponse, error) UpsertAliasWithResponse(ctx context.Context, aliasName string, body UpsertAliasJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertAliasResponse, error) // GetCollectionsWithResponse request GetCollectionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCollectionsResponse, error) // CreateCollectionWithBodyWithResponse request with any body CreateCollectionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error) CreateCollectionWithResponse(ctx context.Context, body CreateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCollectionResponse, error) // DeleteCollectionWithResponse request DeleteCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*DeleteCollectionResponse, error) // GetCollectionWithResponse request GetCollectionWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetCollectionResponse, error) // UpdateCollectionWithBodyWithResponse request with any body UpdateCollectionWithBodyWithResponse(ctx context.Context, collectionName string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCollectionResponse, error) UpdateCollectionWithResponse(ctx context.Context, collectionName string, body UpdateCollectionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCollectionResponse, error) // DeleteDocumentsWithResponse request DeleteDocumentsWithResponse(ctx context.Context, collectionName string, params *DeleteDocumentsParams, reqEditors ...RequestEditorFn) (*DeleteDocumentsResponse, error) // UpdateDocumentsWithBodyWithResponse request with any body UpdateDocumentsWithBodyWithResponse(ctx context.Context, collectionName string, params *UpdateDocumentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDocumentsResponse, error) UpdateDocumentsWithResponse(ctx context.Context, collectionName string, params *UpdateDocumentsParams, body UpdateDocumentsJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDocumentsResponse, error) // IndexDocumentWithBodyWithResponse request with any body IndexDocumentWithBodyWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IndexDocumentResponse, error) IndexDocumentWithResponse(ctx context.Context, collectionName string, params *IndexDocumentParams, body IndexDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*IndexDocumentResponse, error) // ExportDocumentsWithResponse request ExportDocumentsWithResponse(ctx context.Context, collectionName string, params *ExportDocumentsParams, reqEditors ...RequestEditorFn) (*ExportDocumentsResponse, error) // ImportDocumentsWithBodyWithResponse request with any body ImportDocumentsWithBodyWithResponse(ctx context.Context, collectionName string, params *ImportDocumentsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ImportDocumentsResponse, error) // SearchCollectionWithResponse request SearchCollectionWithResponse(ctx context.Context, collectionName string, params *SearchCollectionParams, reqEditors ...RequestEditorFn) (*SearchCollectionResponse, error) // DeleteDocumentWithResponse request DeleteDocumentWithResponse(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*DeleteDocumentResponse, error) // GetDocumentWithResponse request GetDocumentWithResponse(ctx context.Context, collectionName string, documentId string, reqEditors ...RequestEditorFn) (*GetDocumentResponse, error) // UpdateDocumentWithBodyWithResponse request with any body UpdateDocumentWithBodyWithResponse(ctx context.Context, collectionName string, documentId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDocumentResponse, error) UpdateDocumentWithResponse(ctx context.Context, collectionName string, documentId string, body UpdateDocumentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDocumentResponse, error) // GetSearchOverridesWithResponse request GetSearchOverridesWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchOverridesResponse, error) // DeleteSearchOverrideWithResponse request DeleteSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*DeleteSearchOverrideResponse, error) // GetSearchOverrideWithResponse request GetSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, reqEditors ...RequestEditorFn) (*GetSearchOverrideResponse, error) // UpsertSearchOverrideWithBodyWithResponse request with any body UpsertSearchOverrideWithBodyWithResponse(ctx context.Context, collectionName string, overrideId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertSearchOverrideResponse, error) UpsertSearchOverrideWithResponse(ctx context.Context, collectionName string, overrideId string, body UpsertSearchOverrideJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertSearchOverrideResponse, error) // GetSearchSynonymsWithResponse request GetSearchSynonymsWithResponse(ctx context.Context, collectionName string, reqEditors ...RequestEditorFn) (*GetSearchSynonymsResponse, error) // DeleteSearchSynonymWithResponse request DeleteSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*DeleteSearchSynonymResponse, error) // GetSearchSynonymWithResponse request GetSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, reqEditors ...RequestEditorFn) (*GetSearchSynonymResponse, error) // UpsertSearchSynonymWithBodyWithResponse request with any body UpsertSearchSynonymWithBodyWithResponse(ctx context.Context, collectionName string, synonymId string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertSearchSynonymResponse, error) UpsertSearchSynonymWithResponse(ctx context.Context, collectionName string, synonymId string, body UpsertSearchSynonymJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertSearchSynonymResponse, error) // DebugWithResponse request DebugWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*DebugResponse, error) // HealthWithResponse request HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error) // GetKeysWithResponse request GetKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetKeysResponse, error) // CreateKeyWithBodyWithResponse request with any body CreateKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error) CreateKeyWithResponse(ctx context.Context, body CreateKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateKeyResponse, error) // DeleteKeyWithResponse request DeleteKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*DeleteKeyResponse, error) // GetKeyWithResponse request GetKeyWithResponse(ctx context.Context, keyId int64, reqEditors ...RequestEditorFn) (*GetKeyResponse, error) // MultiSearchWithBodyWithResponse request with any body MultiSearchWithBodyWithResponse(ctx context.Context, params *MultiSearchParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MultiSearchResponse, error) MultiSearchWithResponse(ctx context.Context, params *MultiSearchParams, body MultiSearchJSONRequestBody, reqEditors ...RequestEditorFn) (*MultiSearchResponse, error) // TakeSnapshotWithResponse request TakeSnapshotWithResponse(ctx context.Context, params *TakeSnapshotParams, reqEditors ...RequestEditorFn) (*TakeSnapshotResponse, error) // VoteWithResponse request VoteWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*VoteResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CollectionAlias ¶
type CollectionAlias struct { // CollectionName Name of the collection the alias mapped to CollectionName string `json:"collection_name"` // Name Name of the collection alias Name *string `json:"name,omitempty"` }
CollectionAlias defines model for CollectionAlias.
type CollectionAliasSchema ¶
type CollectionAliasSchema struct { // CollectionName Name of the collection you wish to map the alias to CollectionName string `json:"collection_name"` }
CollectionAliasSchema defines model for CollectionAliasSchema.
type CollectionAliasesResponse ¶
type CollectionAliasesResponse struct {
Aliases []*CollectionAlias `json:"aliases"`
}
CollectionAliasesResponse defines model for CollectionAliasesResponse.
type CollectionResponse ¶
type CollectionResponse struct { // CreatedAt Timestamp of when the collection was created CreatedAt *int64 `json:"created_at,omitempty"` // DefaultSortingField The name of an int32 / float field that determines the order in which the search results are ranked when a sort_by clause is not provided during searching. This field must indicate some kind of popularity. DefaultSortingField *string `json:"default_sorting_field,omitempty"` // EnableNestedFields Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later. EnableNestedFields *bool `json:"enable_nested_fields,omitempty"` // Fields A list of fields for querying, filtering and faceting Fields []Field `json:"fields"` // Name Name of the collection Name string `json:"name"` // NumDocuments Number of documents in the collection NumDocuments *int64 `json:"num_documents,omitempty"` // SymbolsToIndex List of symbols or special characters to be indexed. SymbolsToIndex *[]string `json:"symbols_to_index,omitempty"` // TokenSeparators List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. TokenSeparators *[]string `json:"token_separators,omitempty"` }
CollectionResponse defines model for CollectionResponse.
type CollectionSchema ¶
type CollectionSchema struct { // DefaultSortingField The name of an int32 / float field that determines the order in which the search results are ranked when a sort_by clause is not provided during searching. This field must indicate some kind of popularity. DefaultSortingField *string `json:"default_sorting_field,omitempty"` // EnableNestedFields Enables experimental support at a collection level for nested object or object array fields. This field is only available if the Typesense server is version `0.24.0.rcn34` or later. EnableNestedFields *bool `json:"enable_nested_fields,omitempty"` // Fields A list of fields for querying, filtering and faceting Fields []Field `json:"fields"` // Name Name of the collection Name string `json:"name"` // SymbolsToIndex List of symbols or special characters to be indexed. SymbolsToIndex *[]string `json:"symbols_to_index,omitempty"` // TokenSeparators List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters. TokenSeparators *[]string `json:"token_separators,omitempty"` }
CollectionSchema defines model for CollectionSchema.
type CollectionUpdateSchema ¶
type CollectionUpdateSchema struct { // Fields A list of fields for querying, filtering and faceting Fields []Field `json:"fields"` }
CollectionUpdateSchema defines model for CollectionUpdateSchema.
type CreateCollectionJSONRequestBody ¶
type CreateCollectionJSONRequestBody = CollectionSchema
CreateCollectionJSONRequestBody defines body for CreateCollection for application/json ContentType.
type CreateCollectionResponse ¶
type CreateCollectionResponse struct { Body []byte HTTPResponse *http.Response JSON201 *CollectionResponse JSON400 *ApiResponse JSON409 *ApiResponse }
func ParseCreateCollectionResponse ¶
func ParseCreateCollectionResponse(rsp *http.Response) (*CreateCollectionResponse, error)
ParseCreateCollectionResponse parses an HTTP response from a CreateCollectionWithResponse call
func (CreateCollectionResponse) Status ¶
func (r CreateCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (CreateCollectionResponse) StatusCode ¶
func (r CreateCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type CreateKeyJSONRequestBody ¶
type CreateKeyJSONRequestBody = ApiKeySchema
CreateKeyJSONRequestBody defines body for CreateKey for application/json ContentType.
type CreateKeyResponse ¶
type CreateKeyResponse struct { Body []byte HTTPResponse *http.Response JSON201 *ApiKey JSON400 *ApiResponse JSON409 *ApiResponse }
func ParseCreateKeyResponse ¶
func ParseCreateKeyResponse(rsp *http.Response) (*CreateKeyResponse, error)
ParseCreateKeyResponse parses an HTTP response from a CreateKeyWithResponse call
func (CreateKeyResponse) Status ¶
func (r CreateKeyResponse) Status() string
Status returns HTTPResponse.Status
func (CreateKeyResponse) StatusCode ¶
func (r CreateKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DebugResponse ¶
type DebugResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { Version *string `json:"version,omitempty"` } }
func ParseDebugResponse ¶
func ParseDebugResponse(rsp *http.Response) (*DebugResponse, error)
ParseDebugResponse parses an HTTP response from a DebugWithResponse call
func (DebugResponse) Status ¶
func (r DebugResponse) Status() string
Status returns HTTPResponse.Status
func (DebugResponse) StatusCode ¶
func (r DebugResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteAliasResponse ¶
type DeleteAliasResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionAlias JSON404 *ApiResponse }
func ParseDeleteAliasResponse ¶
func ParseDeleteAliasResponse(rsp *http.Response) (*DeleteAliasResponse, error)
ParseDeleteAliasResponse parses an HTTP response from a DeleteAliasWithResponse call
func (DeleteAliasResponse) Status ¶
func (r DeleteAliasResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteAliasResponse) StatusCode ¶
func (r DeleteAliasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteCollectionResponse ¶
type DeleteCollectionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionResponse JSON404 *ApiResponse }
func ParseDeleteCollectionResponse ¶
func ParseDeleteCollectionResponse(rsp *http.Response) (*DeleteCollectionResponse, error)
ParseDeleteCollectionResponse parses an HTTP response from a DeleteCollectionWithResponse call
func (DeleteCollectionResponse) Status ¶
func (r DeleteCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteCollectionResponse) StatusCode ¶
func (r DeleteCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteDocumentResponse ¶
type DeleteDocumentResponse struct { Body []byte HTTPResponse *http.Response JSON200 *map[string]interface{} JSON404 *ApiResponse }
func ParseDeleteDocumentResponse ¶
func ParseDeleteDocumentResponse(rsp *http.Response) (*DeleteDocumentResponse, error)
ParseDeleteDocumentResponse parses an HTTP response from a DeleteDocumentWithResponse call
func (DeleteDocumentResponse) Status ¶
func (r DeleteDocumentResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteDocumentResponse) StatusCode ¶
func (r DeleteDocumentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteDocumentsParams ¶
type DeleteDocumentsParams struct { BatchSize *int `form:"batch_size,omitempty" json:"batch_size,omitempty"` FilterBy *string `form:"filter_by,omitempty" json:"filter_by,omitempty"` }
DeleteDocumentsParams defines parameters for DeleteDocuments.
type DeleteDocumentsResponse ¶
type DeleteDocumentsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { NumDeleted int `json:"num_deleted"` } JSON404 *ApiResponse }
func ParseDeleteDocumentsResponse ¶
func ParseDeleteDocumentsResponse(rsp *http.Response) (*DeleteDocumentsResponse, error)
ParseDeleteDocumentsResponse parses an HTTP response from a DeleteDocumentsWithResponse call
func (DeleteDocumentsResponse) Status ¶
func (r DeleteDocumentsResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteDocumentsResponse) StatusCode ¶
func (r DeleteDocumentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteKeyResponse ¶
type DeleteKeyResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ApiKey JSON400 *ApiResponse JSON404 *ApiResponse }
func ParseDeleteKeyResponse ¶
func ParseDeleteKeyResponse(rsp *http.Response) (*DeleteKeyResponse, error)
ParseDeleteKeyResponse parses an HTTP response from a DeleteKeyWithResponse call
func (DeleteKeyResponse) Status ¶
func (r DeleteKeyResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteKeyResponse) StatusCode ¶
func (r DeleteKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteSearchOverrideResponse ¶
type DeleteSearchOverrideResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchOverride JSON404 *ApiResponse }
func ParseDeleteSearchOverrideResponse ¶
func ParseDeleteSearchOverrideResponse(rsp *http.Response) (*DeleteSearchOverrideResponse, error)
ParseDeleteSearchOverrideResponse parses an HTTP response from a DeleteSearchOverrideWithResponse call
func (DeleteSearchOverrideResponse) Status ¶
func (r DeleteSearchOverrideResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteSearchOverrideResponse) StatusCode ¶
func (r DeleteSearchOverrideResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteSearchSynonymResponse ¶
type DeleteSearchSynonymResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchSynonym JSON404 *ApiResponse }
func ParseDeleteSearchSynonymResponse ¶
func ParseDeleteSearchSynonymResponse(rsp *http.Response) (*DeleteSearchSynonymResponse, error)
ParseDeleteSearchSynonymResponse parses an HTTP response from a DeleteSearchSynonymWithResponse call
func (DeleteSearchSynonymResponse) Status ¶
func (r DeleteSearchSynonymResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteSearchSynonymResponse) StatusCode ¶
func (r DeleteSearchSynonymResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ExportDocumentsParams ¶
type ExportDocumentsParams struct { ExcludeFields *string `form:"exclude_fields,omitempty" json:"exclude_fields,omitempty"` FilterBy *string `form:"filter_by,omitempty" json:"filter_by,omitempty"` IncludeFields *string `form:"include_fields,omitempty" json:"include_fields,omitempty"` }
ExportDocumentsParams defines parameters for ExportDocuments.
type ExportDocumentsResponse ¶
type ExportDocumentsResponse struct { Body []byte HTTPResponse *http.Response JSON404 *ApiResponse }
func ParseExportDocumentsResponse ¶
func ParseExportDocumentsResponse(rsp *http.Response) (*ExportDocumentsResponse, error)
ParseExportDocumentsResponse parses an HTTP response from a ExportDocumentsWithResponse call
func (ExportDocumentsResponse) Status ¶
func (r ExportDocumentsResponse) Status() string
Status returns HTTPResponse.Status
func (ExportDocumentsResponse) StatusCode ¶
func (r ExportDocumentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type FacetCounts ¶
type FacetCounts struct { Counts *[]struct { Count *int `json:"count,omitempty"` Highlighted *string `json:"highlighted,omitempty"` Value *string `json:"value,omitempty"` } `json:"counts,omitempty"` FieldName *string `json:"field_name,omitempty"` Stats *struct { Avg *float64 `json:"avg,omitempty"` Max *float64 `json:"max,omitempty"` Min *float64 `json:"min,omitempty"` Sum *float64 `json:"sum,omitempty"` TotalValues *int `json:"total_values,omitempty"` } `json:"stats,omitempty"` }
FacetCounts defines model for FacetCounts.
type Field ¶
type Field struct { Drop *bool `json:"drop,omitempty"` Facet *bool `json:"facet,omitempty"` Index *bool `json:"index,omitempty"` Infix *bool `json:"infix,omitempty"` Locale *string `json:"locale,omitempty"` Name string `json:"name"` NumDim *int `json:"num_dim,omitempty"` Optional *bool `json:"optional,omitempty"` Sort *bool `json:"sort,omitempty"` Type string `json:"type"` }
Field defines model for Field.
type GetAliasResponse ¶
type GetAliasResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionAlias JSON404 *ApiResponse }
func ParseGetAliasResponse ¶
func ParseGetAliasResponse(rsp *http.Response) (*GetAliasResponse, error)
ParseGetAliasResponse parses an HTTP response from a GetAliasWithResponse call
func (GetAliasResponse) Status ¶
func (r GetAliasResponse) Status() string
Status returns HTTPResponse.Status
func (GetAliasResponse) StatusCode ¶
func (r GetAliasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetAliasesResponse ¶
type GetAliasesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionAliasesResponse }
func ParseGetAliasesResponse ¶
func ParseGetAliasesResponse(rsp *http.Response) (*GetAliasesResponse, error)
ParseGetAliasesResponse parses an HTTP response from a GetAliasesWithResponse call
func (GetAliasesResponse) Status ¶
func (r GetAliasesResponse) Status() string
Status returns HTTPResponse.Status
func (GetAliasesResponse) StatusCode ¶
func (r GetAliasesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCollectionResponse ¶
type GetCollectionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionResponse JSON404 *ApiResponse }
func ParseGetCollectionResponse ¶
func ParseGetCollectionResponse(rsp *http.Response) (*GetCollectionResponse, error)
ParseGetCollectionResponse parses an HTTP response from a GetCollectionWithResponse call
func (GetCollectionResponse) Status ¶
func (r GetCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (GetCollectionResponse) StatusCode ¶
func (r GetCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetCollectionsResponse ¶
type GetCollectionsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *[]*CollectionResponse }
func ParseGetCollectionsResponse ¶
func ParseGetCollectionsResponse(rsp *http.Response) (*GetCollectionsResponse, error)
ParseGetCollectionsResponse parses an HTTP response from a GetCollectionsWithResponse call
func (GetCollectionsResponse) Status ¶
func (r GetCollectionsResponse) Status() string
Status returns HTTPResponse.Status
func (GetCollectionsResponse) StatusCode ¶
func (r GetCollectionsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetDocumentResponse ¶
type GetDocumentResponse struct { Body []byte HTTPResponse *http.Response JSON200 *map[string]interface{} JSON404 *ApiResponse }
func ParseGetDocumentResponse ¶
func ParseGetDocumentResponse(rsp *http.Response) (*GetDocumentResponse, error)
ParseGetDocumentResponse parses an HTTP response from a GetDocumentWithResponse call
func (GetDocumentResponse) Status ¶
func (r GetDocumentResponse) Status() string
Status returns HTTPResponse.Status
func (GetDocumentResponse) StatusCode ¶
func (r GetDocumentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetKeyResponse ¶
type GetKeyResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ApiKey JSON404 *ApiResponse }
func ParseGetKeyResponse ¶
func ParseGetKeyResponse(rsp *http.Response) (*GetKeyResponse, error)
ParseGetKeyResponse parses an HTTP response from a GetKeyWithResponse call
func (GetKeyResponse) Status ¶
func (r GetKeyResponse) Status() string
Status returns HTTPResponse.Status
func (GetKeyResponse) StatusCode ¶
func (r GetKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetKeysResponse ¶
type GetKeysResponse struct { Body []byte HTTPResponse *http.Response JSON200 *ApiKeysResponse }
func ParseGetKeysResponse ¶
func ParseGetKeysResponse(rsp *http.Response) (*GetKeysResponse, error)
ParseGetKeysResponse parses an HTTP response from a GetKeysWithResponse call
func (GetKeysResponse) Status ¶
func (r GetKeysResponse) Status() string
Status returns HTTPResponse.Status
func (GetKeysResponse) StatusCode ¶
func (r GetKeysResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSearchOverrideResponse ¶
type GetSearchOverrideResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchOverride }
func ParseGetSearchOverrideResponse ¶
func ParseGetSearchOverrideResponse(rsp *http.Response) (*GetSearchOverrideResponse, error)
ParseGetSearchOverrideResponse parses an HTTP response from a GetSearchOverrideWithResponse call
func (GetSearchOverrideResponse) Status ¶
func (r GetSearchOverrideResponse) Status() string
Status returns HTTPResponse.Status
func (GetSearchOverrideResponse) StatusCode ¶
func (r GetSearchOverrideResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSearchOverridesResponse ¶
type GetSearchOverridesResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchOverridesResponse }
func ParseGetSearchOverridesResponse ¶
func ParseGetSearchOverridesResponse(rsp *http.Response) (*GetSearchOverridesResponse, error)
ParseGetSearchOverridesResponse parses an HTTP response from a GetSearchOverridesWithResponse call
func (GetSearchOverridesResponse) Status ¶
func (r GetSearchOverridesResponse) Status() string
Status returns HTTPResponse.Status
func (GetSearchOverridesResponse) StatusCode ¶
func (r GetSearchOverridesResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSearchSynonymResponse ¶
type GetSearchSynonymResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchSynonym JSON404 *ApiResponse }
func ParseGetSearchSynonymResponse ¶
func ParseGetSearchSynonymResponse(rsp *http.Response) (*GetSearchSynonymResponse, error)
ParseGetSearchSynonymResponse parses an HTTP response from a GetSearchSynonymWithResponse call
func (GetSearchSynonymResponse) Status ¶
func (r GetSearchSynonymResponse) Status() string
Status returns HTTPResponse.Status
func (GetSearchSynonymResponse) StatusCode ¶
func (r GetSearchSynonymResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSearchSynonymsResponse ¶
type GetSearchSynonymsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchSynonymsResponse JSON404 *ApiResponse }
func ParseGetSearchSynonymsResponse ¶
func ParseGetSearchSynonymsResponse(rsp *http.Response) (*GetSearchSynonymsResponse, error)
ParseGetSearchSynonymsResponse parses an HTTP response from a GetSearchSynonymsWithResponse call
func (GetSearchSynonymsResponse) Status ¶
func (r GetSearchSynonymsResponse) Status() string
Status returns HTTPResponse.Status
func (GetSearchSynonymsResponse) StatusCode ¶
func (r GetSearchSynonymsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HealthResponse ¶
type HealthResponse struct { Body []byte HTTPResponse *http.Response JSON200 *HealthStatus }
func ParseHealthResponse ¶
func ParseHealthResponse(rsp *http.Response) (*HealthResponse, error)
ParseHealthResponse parses an HTTP response from a HealthWithResponse call
func (HealthResponse) Status ¶
func (r HealthResponse) Status() string
Status returns HTTPResponse.Status
func (HealthResponse) StatusCode ¶
func (r HealthResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HealthStatus ¶
type HealthStatus struct {
Ok bool `json:"ok"`
}
HealthStatus defines model for HealthStatus.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type ImportDocumentResponse ¶
type ImportDocumentsParams ¶
type ImportDocumentsParams struct { Action *string `form:"action,omitempty" json:"action,omitempty"` BatchSize *int `form:"batch_size,omitempty" json:"batch_size,omitempty"` DirtyValues *ImportDocumentsParamsDirtyValues `form:"dirty_values,omitempty" json:"dirty_values,omitempty"` }
ImportDocumentsParams defines parameters for ImportDocuments.
type ImportDocumentsParamsDirtyValues ¶
type ImportDocumentsParamsDirtyValues string
ImportDocumentsParamsDirtyValues defines parameters for ImportDocuments.
const ( CoerceOrDrop ImportDocumentsParamsDirtyValues = "coerce_or_drop" CoerceOrReject ImportDocumentsParamsDirtyValues = "coerce_or_reject" Drop ImportDocumentsParamsDirtyValues = "drop" Reject ImportDocumentsParamsDirtyValues = "reject" )
Defines values for ImportDocumentsParamsDirtyValues.
type ImportDocumentsResponse ¶
type ImportDocumentsResponse struct { Body []byte HTTPResponse *http.Response JSON400 *ApiResponse JSON404 *ApiResponse }
func ParseImportDocumentsResponse ¶
func ParseImportDocumentsResponse(rsp *http.Response) (*ImportDocumentsResponse, error)
ParseImportDocumentsResponse parses an HTTP response from a ImportDocumentsWithResponse call
func (ImportDocumentsResponse) Status ¶
func (r ImportDocumentsResponse) Status() string
Status returns HTTPResponse.Status
func (ImportDocumentsResponse) StatusCode ¶
func (r ImportDocumentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type IndexDocumentJSONBody ¶
type IndexDocumentJSONBody = interface{}
IndexDocumentJSONBody defines parameters for IndexDocument.
type IndexDocumentJSONRequestBody ¶
type IndexDocumentJSONRequestBody = IndexDocumentJSONBody
IndexDocumentJSONRequestBody defines body for IndexDocument for application/json ContentType.
type IndexDocumentParams ¶
type IndexDocumentParams struct { // Action Additional action to perform Action *IndexDocumentParamsAction `form:"action,omitempty" json:"action,omitempty"` }
IndexDocumentParams defines parameters for IndexDocument.
type IndexDocumentParamsAction ¶
type IndexDocumentParamsAction string
IndexDocumentParamsAction defines parameters for IndexDocument.
const (
Upsert IndexDocumentParamsAction = "upsert"
)
Defines values for IndexDocumentParamsAction.
type IndexDocumentResponse ¶
type IndexDocumentResponse struct { Body []byte HTTPResponse *http.Response JSON201 *map[string]interface{} JSON404 *ApiResponse }
func ParseIndexDocumentResponse ¶
func ParseIndexDocumentResponse(rsp *http.Response) (*IndexDocumentResponse, error)
ParseIndexDocumentResponse parses an HTTP response from a IndexDocumentWithResponse call
func (IndexDocumentResponse) Status ¶
func (r IndexDocumentResponse) Status() string
Status returns HTTPResponse.Status
func (IndexDocumentResponse) StatusCode ¶
func (r IndexDocumentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MultiSearchCollectionParameters ¶
type MultiSearchCollectionParameters struct { // CacheTtl The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60. CacheTtl *int `json:"cache_ttl,omitempty"` // Collection The collection to search in. Collection string `json:"collection"` // DropTokensThreshold If the number of results found for a specific query is less than this number, Typesense will attempt to drop the tokens in the query until enough results are found. Tokens that have the least individual hits are dropped first. Set to 0 to disable. Default: 10 DropTokensThreshold *int `json:"drop_tokens_threshold,omitempty"` // EnableOverrides If you have some overrides defined but want to disable all of them during query time, you can do that by setting this parameter to false EnableOverrides *bool `json:"enable_overrides,omitempty"` // ExcludeFields List of fields from the document to exclude in the search result ExcludeFields *string `json:"exclude_fields,omitempty"` // ExhaustiveSearch Setting this to true will make Typesense consider all prefixes and typo corrections of the words in the query without stopping early when enough results are found (drop_tokens_threshold and typo_tokens_threshold configurations are ignored). ExhaustiveSearch *bool `json:"exhaustive_search,omitempty"` // FacetBy A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. FacetBy *string `json:"facet_by,omitempty"` // FacetQuery Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe". FacetQuery *string `json:"facet_query,omitempty"` // FilterBy Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. FilterBy *string `json:"filter_by,omitempty"` // GroupBy You can aggregate search results into groups or buckets by specify one or more `group_by` fields. Separate multiple fields with a comma. To group on a particular field, it must be a faceted field. GroupBy *string `json:"group_by,omitempty"` // GroupLimit Maximum number of hits to be returned for every group. If the `group_limit` is set as `K` then only the top K hits in each group are returned in the response. Default: 3 GroupLimit *int `json:"group_limit,omitempty"` // HiddenHits A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`. // You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`. HiddenHits *string `json:"hidden_hits,omitempty"` // HighlightAffixNumTokens The number of tokens that should surround the highlighted text on each side. Default: 4 HighlightAffixNumTokens *int `json:"highlight_affix_num_tokens,omitempty"` // HighlightEndTag The end tag used for the highlighted snippets. Default: `</mark>` HighlightEndTag *string `json:"highlight_end_tag,omitempty"` // HighlightFields A list of custom fields that must be highlighted even if you don't query for them HighlightFields *string `json:"highlight_fields,omitempty"` // HighlightFullFields List of fields which should be highlighted fully without snippeting HighlightFullFields *string `json:"highlight_full_fields,omitempty"` // HighlightStartTag The start tag used for the highlighted snippets. Default: `<mark>` HighlightStartTag *string `json:"highlight_start_tag,omitempty"` // IncludeFields List of fields from the document to include in the search result IncludeFields *string `json:"include_fields,omitempty"` // Infix If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results Infix *string `json:"infix,omitempty"` // MaxExtraPrefix There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. MaxExtraPrefix *int `json:"max_extra_prefix,omitempty"` // MaxExtraSuffix There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. MaxExtraSuffix *int `json:"max_extra_suffix,omitempty"` // MaxFacetValues Maximum number of facet values to be returned. MaxFacetValues *int `json:"max_facet_values,omitempty"` // MinLen1typo Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. MinLen1typo *int `json:"min_len_1typo,omitempty"` // MinLen2typo Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. MinLen2typo *int `json:"min_len_2typo,omitempty"` // NumTypos The number of typographical errors (1 or 2) that would be tolerated. Default: 2 NumTypos *string `json:"num_typos,omitempty"` // Page Results from this specific page number would be fetched. Page *int `json:"page,omitempty"` // PerPage Number of results to fetch per page. Default: 10 PerPage *int `json:"per_page,omitempty"` // PinnedHits A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. // You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`. PinnedHits *string `json:"pinned_hits,omitempty"` // PreSegmentedQuery You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. // Set this parameter to true to do the same PreSegmentedQuery *bool `json:"pre_segmented_query,omitempty"` // Prefix Boolean field to indicate that the last word in the query should be treated as a prefix, and not as a whole word. This is used for building autocomplete and instant search interfaces. Defaults to true. Prefix *string `json:"prefix,omitempty"` // PrioritizeExactMatch Set this parameter to true to ensure that an exact match is ranked above the others PrioritizeExactMatch *bool `json:"prioritize_exact_match,omitempty"` // Q The query text to search for in the collection. Use * as the search string to return all documents. This is typically useful when used in conjunction with filter_by. Q *string `json:"q,omitempty"` // QueryBy A list of `string` fields that should be queried against. Multiple fields are separated with a comma. QueryBy *string `json:"query_by,omitempty"` // QueryByWeights The relative weight to give each `query_by` field when ranking results. This can be used to boost fields in priority, when looking for matches. Multiple fields are separated with a comma. QueryByWeights *string `json:"query_by_weights,omitempty"` // SearchCutoffMs Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter. SearchCutoffMs *int `json:"search_cutoff_ms,omitempty"` // SnippetThreshold Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 SnippetThreshold *int `json:"snippet_threshold,omitempty"` // SortBy A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc` SortBy *string `json:"sort_by,omitempty"` // TypoTokensThreshold If the number of results found for a specific query is less than this number, Typesense will attempt to look for tokens with more typos until enough results are found. Default: 100 TypoTokensThreshold *int `json:"typo_tokens_threshold,omitempty"` // UseCache Enable server side caching of search query results. By default, caching is disabled. UseCache *bool `json:"use_cache,omitempty"` // VectorQuery Vector query expression for fetching documents "closest" to a given query/document vector. VectorQuery *string `json:"vector_query,omitempty"` }
MultiSearchCollectionParameters defines model for MultiSearchCollectionParameters.
type MultiSearchJSONRequestBody ¶
type MultiSearchJSONRequestBody = MultiSearchSearchesParameter
MultiSearchJSONRequestBody defines body for MultiSearch for application/json ContentType.
type MultiSearchParameters ¶
type MultiSearchParameters struct { // CacheTtl The duration (in seconds) that determines how long the search query is cached. This value can be set on a per-query basis. Default: 60. CacheTtl *int `json:"cache_ttl,omitempty"` // DropTokensThreshold If the number of results found for a specific query is less than this number, Typesense will attempt to drop the tokens in the query until enough results are found. Tokens that have the least individual hits are dropped first. Set to 0 to disable. Default: 10 DropTokensThreshold *int `json:"drop_tokens_threshold,omitempty"` // EnableOverrides If you have some overrides defined but want to disable all of them during query time, you can do that by setting this parameter to false EnableOverrides *bool `json:"enable_overrides,omitempty"` // ExcludeFields List of fields from the document to exclude in the search result ExcludeFields *string `json:"exclude_fields,omitempty"` // ExhaustiveSearch Setting this to true will make Typesense consider all prefixes and typo corrections of the words in the query without stopping early when enough results are found (drop_tokens_threshold and typo_tokens_threshold configurations are ignored). ExhaustiveSearch *bool `json:"exhaustive_search,omitempty"` // FacetBy A list of fields that will be used for faceting your results on. Separate multiple fields with a comma. FacetBy *string `json:"facet_by,omitempty"` // FacetQuery Facet values that are returned can now be filtered via this parameter. The matching facet text is also highlighted. For example, when faceting by `category`, you can set `facet_query=category:shoe` to return only facet values that contain the prefix "shoe". FacetQuery *string `json:"facet_query,omitempty"` // FilterBy Filter conditions for refining youropen api validator search results. Separate multiple conditions with &&. FilterBy *string `json:"filter_by,omitempty"` // GroupBy You can aggregate search results into groups or buckets by specify one or more `group_by` fields. Separate multiple fields with a comma. To group on a particular field, it must be a faceted field. GroupBy *string `json:"group_by,omitempty"` // GroupLimit Maximum number of hits to be returned for every group. If the `group_limit` is set as `K` then only the top K hits in each group are returned in the response. Default: 3 GroupLimit *int `json:"group_limit,omitempty"` // HiddenHits A list of records to unconditionally hide from search results. A list of `record_id`s to hide. Eg: to hide records with IDs 123 and 456, you'd specify `123,456`. // You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`. HiddenHits *string `json:"hidden_hits,omitempty"` // HighlightAffixNumTokens The number of tokens that should surround the highlighted text on each side. Default: 4 HighlightAffixNumTokens *int `json:"highlight_affix_num_tokens,omitempty"` // HighlightEndTag The end tag used for the highlighted snippets. Default: `</mark>` HighlightEndTag *string `json:"highlight_end_tag,omitempty"` // HighlightFields A list of custom fields that must be highlighted even if you don't query for them HighlightFields *string `json:"highlight_fields,omitempty"` // HighlightFullFields List of fields which should be highlighted fully without snippeting HighlightFullFields *string `json:"highlight_full_fields,omitempty"` // HighlightStartTag The start tag used for the highlighted snippets. Default: `<mark>` HighlightStartTag *string `json:"highlight_start_tag,omitempty"` // IncludeFields List of fields from the document to include in the search result IncludeFields *string `json:"include_fields,omitempty"` // Infix If infix index is enabled for this field, infix searching can be done on a per-field basis by sending a comma separated string parameter called infix to the search query. This parameter can have 3 values; `off` infix search is disabled, which is default `always` infix search is performed along with regular search `fallback` infix search is performed if regular search does not produce results Infix *string `json:"infix,omitempty"` // MaxExtraPrefix There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. MaxExtraPrefix *int `json:"max_extra_prefix,omitempty"` // MaxExtraSuffix There are also 2 parameters that allow you to control the extent of infix searching max_extra_prefix and max_extra_suffix which specify the maximum number of symbols before or after the query that can be present in the token. For example query "K2100" has 2 extra symbols in "6PK2100". By default, any number of prefixes/suffixes can be present for a match. MaxExtraSuffix *int `json:"max_extra_suffix,omitempty"` // MaxFacetValues Maximum number of facet values to be returned. MaxFacetValues *int `json:"max_facet_values,omitempty"` // MinLen1typo Minimum word length for 1-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. MinLen1typo *int `json:"min_len_1typo,omitempty"` // MinLen2typo Minimum word length for 2-typo correction to be applied. The value of num_typos is still treated as the maximum allowed typos. MinLen2typo *int `json:"min_len_2typo,omitempty"` // NumTypos The number of typographical errors (1 or 2) that would be tolerated. Default: 2 NumTypos *string `json:"num_typos,omitempty"` // Page Results from this specific page number would be fetched. Page *int `json:"page,omitempty"` // PerPage Number of results to fetch per page. Default: 10 PerPage *int `json:"per_page,omitempty"` // PinnedHits A list of records to unconditionally include in the search results at specific positions. An example use case would be to feature or promote certain items on the top of search results. A list of `record_id:hit_position`. Eg: to include a record with ID 123 at Position 1 and another record with ID 456 at Position 5, you'd specify `123:1,456:5`. // You could also use the Overrides feature to override search results based on rules. Overrides are applied first, followed by `pinned_hits` and finally `hidden_hits`. PinnedHits *string `json:"pinned_hits,omitempty"` // PreSegmentedQuery You can index content from any logographic language into Typesense if you are able to segment / split the text into space-separated words yourself before indexing and querying. // Set this parameter to true to do the same PreSegmentedQuery *bool `json:"pre_segmented_query,omitempty"` // Prefix Boolean field to indicate that the last word in the query should be treated as a prefix, and not as a whole word. This is used for building autocomplete and instant search interfaces. Defaults to true. Prefix *string `json:"prefix,omitempty"` // PrioritizeExactMatch Set this parameter to true to ensure that an exact match is ranked above the others PrioritizeExactMatch *bool `json:"prioritize_exact_match,omitempty"` // Q The query text to search for in the collection. Use * as the search string to return all documents. This is typically useful when used in conjunction with filter_by. Q *string `json:"q,omitempty"` // QueryBy A list of `string` fields that should be queried against. Multiple fields are separated with a comma. QueryBy *string `json:"query_by,omitempty"` // QueryByWeights The relative weight to give each `query_by` field when ranking results. This can be used to boost fields in priority, when looking for matches. Multiple fields are separated with a comma. QueryByWeights *string `json:"query_by_weights,omitempty"` // SearchCutoffMs Typesense will attempt to return results early if the cutoff time has elapsed. This is not a strict guarantee and facet computation is not bound by this parameter. SearchCutoffMs *int `json:"search_cutoff_ms,omitempty"` // SnippetThreshold Field values under this length will be fully highlighted, instead of showing a snippet of relevant portion. Default: 30 SnippetThreshold *int `json:"snippet_threshold,omitempty"` // SortBy A list of numerical fields and their corresponding sort orders that will be used for ordering your results. Up to 3 sort fields can be specified. The text similarity score is exposed as a special `_text_match` field that you can use in the list of sorting fields. If no `sort_by` parameter is specified, results are sorted by `_text_match:desc,default_sorting_field:desc` SortBy *string `json:"sort_by,omitempty"` // TypoTokensThreshold If the number of results found for a specific query is less than this number, Typesense will attempt to look for tokens with more typos until enough results are found. Default: 100 TypoTokensThreshold *int `json:"typo_tokens_threshold,omitempty"` // UseCache Enable server side caching of search query results. By default, caching is disabled. UseCache *bool `json:"use_cache,omitempty"` // VectorQuery Vector query expression for fetching documents "closest" to a given query/document vector. VectorQuery *string `json:"vector_query,omitempty"` }
MultiSearchParameters Parameters for the multi search API.
type MultiSearchParams ¶
type MultiSearchParams struct { CacheTtl *int `form:"cache_ttl,omitempty" json:"cache_ttl,omitempty"` DropTokensThreshold *int `form:"drop_tokens_threshold,omitempty" json:"drop_tokens_threshold,omitempty"` EnableHighlightV1 *bool `form:"enable_highlight_v1,omitempty" json:"enable_highlight_v1,omitempty"` EnableOverrides *bool `form:"enable_overrides,omitempty" json:"enable_overrides,omitempty"` ExcludeFields *string `form:"exclude_fields,omitempty" json:"exclude_fields,omitempty"` ExhaustiveSearch *bool `form:"exhaustive_search,omitempty" json:"exhaustive_search,omitempty"` FacetBy *string `form:"facet_by,omitempty" json:"facet_by,omitempty"` FacetQuery *string `form:"facet_query,omitempty" json:"facet_query,omitempty"` FilterBy *string `form:"filter_by,omitempty" json:"filter_by,omitempty"` GroupBy *string `form:"group_by,omitempty" json:"group_by,omitempty"` GroupLimit *int `form:"group_limit,omitempty" json:"group_limit,omitempty"` HiddenHits *string `form:"hidden_hits,omitempty" json:"hidden_hits,omitempty"` HighlightAffixNumTokens *int `form:"highlight_affix_num_tokens,omitempty" json:"highlight_affix_num_tokens,omitempty"` HighlightEndTag *string `form:"highlight_end_tag,omitempty" json:"highlight_end_tag,omitempty"` HighlightFields *string `form:"highlight_fields,omitempty" json:"highlight_fields,omitempty"` HighlightFullFields *string `form:"highlight_full_fields,omitempty" json:"highlight_full_fields,omitempty"` HighlightStartTag *string `form:"highlight_start_tag,omitempty" json:"highlight_start_tag,omitempty"` IncludeFields *string `form:"include_fields,omitempty" json:"include_fields,omitempty"` Infix *string `form:"infix,omitempty" json:"infix,omitempty"` MaxCandidates *int `form:"max_candidates,omitempty" json:"max_candidates,omitempty"` MaxExtraPrefix *int `form:"max_extra_prefix,omitempty" json:"max_extra_prefix,omitempty"` MaxExtraSuffix *int `form:"max_extra_suffix,omitempty" json:"max_extra_suffix,omitempty"` MaxFacetValues *int `form:"max_facet_values,omitempty" json:"max_facet_values,omitempty"` MinLen1typo *int `form:"min_len_1typo,omitempty" json:"min_len_1typo,omitempty"` MinLen2typo *int `form:"min_len_2typo,omitempty" json:"min_len_2typo,omitempty"` NumTypos *string `form:"num_typos,omitempty" json:"num_typos,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` PinnedHits *string `form:"pinned_hits,omitempty" json:"pinned_hits,omitempty"` PreSegmentedQuery *bool `form:"pre_segmented_query,omitempty" json:"pre_segmented_query,omitempty"` Prefix *string `form:"prefix,omitempty" json:"prefix,omitempty"` PrioritizeExactMatch *bool `form:"prioritize_exact_match,omitempty" json:"prioritize_exact_match,omitempty"` PrioritizeTokenPosition *bool `form:"prioritize_token_position,omitempty" json:"prioritize_token_position,omitempty"` Q *string `form:"q,omitempty" json:"q,omitempty"` QueryBy *string `form:"query_by,omitempty" json:"query_by,omitempty"` QueryByWeights *string `form:"query_by_weights,omitempty" json:"query_by_weights,omitempty"` SearchCutoffMs *int `form:"search_cutoff_ms,omitempty" json:"search_cutoff_ms,omitempty"` SnippetThreshold *int `form:"snippet_threshold,omitempty" json:"snippet_threshold,omitempty"` SortBy *string `form:"sort_by,omitempty" json:"sort_by,omitempty"` SplitJoinTokens *string `form:"split_join_tokens,omitempty" json:"split_join_tokens,omitempty"` TypoTokensThreshold *int `form:"typo_tokens_threshold,omitempty" json:"typo_tokens_threshold,omitempty"` UseCache *bool `form:"use_cache,omitempty" json:"use_cache,omitempty"` VectorQuery *string `form:"vector_query,omitempty" json:"vector_query,omitempty"` }
MultiSearchParams defines parameters for MultiSearch.
type MultiSearchResponse ¶
type MultiSearchResponse struct { Body []byte HTTPResponse *http.Response JSON200 *MultiSearchResult JSON400 *ApiResponse }
func ParseMultiSearchResponse ¶
func ParseMultiSearchResponse(rsp *http.Response) (*MultiSearchResponse, error)
ParseMultiSearchResponse parses an HTTP response from a MultiSearchWithResponse call
func (MultiSearchResponse) Status ¶
func (r MultiSearchResponse) Status() string
Status returns HTTPResponse.Status
func (MultiSearchResponse) StatusCode ¶
func (r MultiSearchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MultiSearchResult ¶
type MultiSearchResult struct {
Results []SearchResult `json:"results"`
}
MultiSearchResult defines model for MultiSearchResult.
type MultiSearchSearchesParameter ¶
type MultiSearchSearchesParameter struct {
Searches []MultiSearchCollectionParameters `json:"searches"`
}
MultiSearchSearchesParameter defines model for MultiSearchSearchesParameter.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type SearchCollectionParams ¶
type SearchCollectionParams struct { CacheTtl *int `form:"cache_ttl,omitempty" json:"cache_ttl,omitempty"` DropTokensThreshold *int `form:"drop_tokens_threshold,omitempty" json:"drop_tokens_threshold,omitempty"` EnableHighlightV1 *bool `form:"enable_highlight_v1,omitempty" json:"enable_highlight_v1,omitempty"` EnableOverrides *bool `form:"enable_overrides,omitempty" json:"enable_overrides,omitempty"` ExcludeFields *string `form:"exclude_fields,omitempty" json:"exclude_fields,omitempty"` ExhaustiveSearch *bool `form:"exhaustive_search,omitempty" json:"exhaustive_search,omitempty"` FacetBy *string `form:"facet_by,omitempty" json:"facet_by,omitempty"` FacetQuery *string `form:"facet_query,omitempty" json:"facet_query,omitempty"` FilterBy *string `form:"filter_by,omitempty" json:"filter_by,omitempty"` GroupBy *string `form:"group_by,omitempty" json:"group_by,omitempty"` GroupLimit *int `form:"group_limit,omitempty" json:"group_limit,omitempty"` HiddenHits *string `form:"hidden_hits,omitempty" json:"hidden_hits,omitempty"` HighlightAffixNumTokens *int `form:"highlight_affix_num_tokens,omitempty" json:"highlight_affix_num_tokens,omitempty"` HighlightEndTag *string `form:"highlight_end_tag,omitempty" json:"highlight_end_tag,omitempty"` HighlightFields *string `form:"highlight_fields,omitempty" json:"highlight_fields,omitempty"` HighlightFullFields *string `form:"highlight_full_fields,omitempty" json:"highlight_full_fields,omitempty"` HighlightStartTag *string `form:"highlight_start_tag,omitempty" json:"highlight_start_tag,omitempty"` IncludeFields *string `form:"include_fields,omitempty" json:"include_fields,omitempty"` Infix *string `form:"infix,omitempty" json:"infix,omitempty"` MaxCandidates *int `form:"max_candidates,omitempty" json:"max_candidates,omitempty"` MaxExtraPrefix *int `form:"max_extra_prefix,omitempty" json:"max_extra_prefix,omitempty"` MaxExtraSuffix *int `form:"max_extra_suffix,omitempty" json:"max_extra_suffix,omitempty"` MaxFacetValues *int `form:"max_facet_values,omitempty" json:"max_facet_values,omitempty"` MinLen1typo *int `form:"min_len_1typo,omitempty" json:"min_len_1typo,omitempty"` MinLen2typo *int `form:"min_len_2typo,omitempty" json:"min_len_2typo,omitempty"` NumTypos *string `form:"num_typos,omitempty" json:"num_typos,omitempty"` Page *int `form:"page,omitempty" json:"page,omitempty"` PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` PinnedHits *string `form:"pinned_hits,omitempty" json:"pinned_hits,omitempty"` PreSegmentedQuery *bool `form:"pre_segmented_query,omitempty" json:"pre_segmented_query,omitempty"` Prefix *string `form:"prefix,omitempty" json:"prefix,omitempty"` PrioritizeExactMatch *bool `form:"prioritize_exact_match,omitempty" json:"prioritize_exact_match,omitempty"` PrioritizeTokenPosition *bool `form:"prioritize_token_position,omitempty" json:"prioritize_token_position,omitempty"` Q string `form:"q" json:"q"` QueryBy string `form:"query_by" json:"query_by"` QueryByWeights *string `form:"query_by_weights,omitempty" json:"query_by_weights,omitempty"` SearchCutoffMs *int `form:"search_cutoff_ms,omitempty" json:"search_cutoff_ms,omitempty"` SnippetThreshold *int `form:"snippet_threshold,omitempty" json:"snippet_threshold,omitempty"` SortBy *string `form:"sort_by,omitempty" json:"sort_by,omitempty"` SplitJoinTokens *string `form:"split_join_tokens,omitempty" json:"split_join_tokens,omitempty"` TypoTokensThreshold *int `form:"typo_tokens_threshold,omitempty" json:"typo_tokens_threshold,omitempty"` UseCache *bool `form:"use_cache,omitempty" json:"use_cache,omitempty"` VectorQuery *string `form:"vector_query,omitempty" json:"vector_query,omitempty"` }
SearchCollectionParams defines parameters for SearchCollection.
type SearchCollectionResponse ¶
type SearchCollectionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchResult JSON400 *ApiResponse JSON404 *ApiResponse }
func ParseSearchCollectionResponse ¶
func ParseSearchCollectionResponse(rsp *http.Response) (*SearchCollectionResponse, error)
ParseSearchCollectionResponse parses an HTTP response from a SearchCollectionWithResponse call
func (SearchCollectionResponse) Status ¶
func (r SearchCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (SearchCollectionResponse) StatusCode ¶
func (r SearchCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type SearchGroupedHit ¶
type SearchGroupedHit struct { GroupKey []string `json:"group_key"` // Hits The documents that matched the search query Hits []SearchResultHit `json:"hits"` }
SearchGroupedHit defines model for SearchGroupedHit.
type SearchHighlight ¶
type SearchHighlight struct { Field *string `json:"field,omitempty"` // Indices The indices property will be present only for string[] fields and will contain the corresponding indices of the snippets in the search field Indices *[]int `json:"indices,omitempty"` MatchedTokens *[]interface{} `json:"matched_tokens,omitempty"` // Snippet Present only for (non-array) string fields Snippet *string `json:"snippet,omitempty"` // Snippets Present only for (array) string[] fields Snippets *[]string `json:"snippets,omitempty"` // Value Full field value with highlighting, present only for (non-array) string fields Value *string `json:"value,omitempty"` // Values Full field value with highlighting, present only for (array) string[] fields Values *[]string `json:"values,omitempty"` }
SearchHighlight defines model for SearchHighlight.
type SearchOverride ¶
type SearchOverride struct { // Excludes List of document `id`s that should be excluded from the search results. Excludes *[]SearchOverrideExclude `json:"excludes,omitempty"` // FilterBy A filter by clause that is applied to any search query that matches the override rule. FilterBy *string `json:"filter_by,omitempty"` Id *string `json:"id,omitempty"` // Includes List of document `id`s that should be included in the search results with their corresponding `position`s. Includes *[]SearchOverrideInclude `json:"includes,omitempty"` // RemoveMatchedTokens Indicates whether search query tokens that exist in the override's rule should be removed from the search query. RemoveMatchedTokens *bool `json:"remove_matched_tokens,omitempty"` Rule SearchOverrideRule `json:"rule"` }
SearchOverride defines model for SearchOverride.
type SearchOverrideExclude ¶
type SearchOverrideExclude struct { // Id document id that should be excluded from the search results. Id string `json:"id"` }
SearchOverrideExclude defines model for SearchOverrideExclude.
type SearchOverrideInclude ¶
type SearchOverrideInclude struct { // Id document id that should be included Id string `json:"id"` // Position position number where document should be included in the search results Position int `json:"position"` }
SearchOverrideInclude defines model for SearchOverrideInclude.
type SearchOverrideRule ¶
type SearchOverrideRule struct { // Match Indicates whether the match on the query term should be `exact` or `contains`. If we want to match all queries that contained the word `apple`, we will use the `contains` match instead. Match SearchOverrideRuleMatch `json:"match"` // Query Indicates what search queries should be overridden Query string `json:"query"` }
SearchOverrideRule defines model for SearchOverrideRule.
type SearchOverrideRuleMatch ¶
type SearchOverrideRuleMatch string
SearchOverrideRuleMatch Indicates whether the match on the query term should be `exact` or `contains`. If we want to match all queries that contained the word `apple`, we will use the `contains` match instead.
const ( Contains SearchOverrideRuleMatch = "contains" Exact SearchOverrideRuleMatch = "exact" )
Defines values for SearchOverrideRuleMatch.
type SearchOverrideSchema ¶
type SearchOverrideSchema struct { // Excludes List of document `id`s that should be excluded from the search results. Excludes *[]SearchOverrideExclude `json:"excludes,omitempty"` // FilterBy A filter by clause that is applied to any search query that matches the override rule. FilterBy *string `json:"filter_by,omitempty"` // Includes List of document `id`s that should be included in the search results with their corresponding `position`s. Includes *[]SearchOverrideInclude `json:"includes,omitempty"` // RemoveMatchedTokens Indicates whether search query tokens that exist in the override's rule should be removed from the search query. RemoveMatchedTokens *bool `json:"remove_matched_tokens,omitempty"` Rule SearchOverrideRule `json:"rule"` }
SearchOverrideSchema defines model for SearchOverrideSchema.
type SearchOverridesResponse ¶
type SearchOverridesResponse struct {
Overrides []*SearchOverride `json:"overrides"`
}
SearchOverridesResponse defines model for SearchOverridesResponse.
type SearchResult ¶
type SearchResult struct { FacetCounts *[]FacetCounts `json:"facet_counts,omitempty"` // Found The number of documents found Found *int `json:"found,omitempty"` GroupedHits *[]SearchGroupedHit `json:"grouped_hits,omitempty"` // Hits The documents that matched the search query Hits *[]SearchResultHit `json:"hits,omitempty"` // OutOf The total number of documents in the collection OutOf *int `json:"out_of,omitempty"` // Page The search result page number Page *int `json:"page,omitempty"` RequestParams *struct { CollectionName string `json:"collection_name"` PerPage int `json:"per_page"` Q string `json:"q"` } `json:"request_params,omitempty"` // SearchCutoff Whether the search was cut off SearchCutoff *bool `json:"search_cutoff,omitempty"` // SearchTimeMs The number of milliseconds the search took SearchTimeMs *int `json:"search_time_ms,omitempty"` }
SearchResult defines model for SearchResult.
type SearchResultHit ¶
type SearchResultHit struct { // Document Can be any key-value pair Document *map[string]interface{} `json:"document,omitempty"` // GeoDistanceMeters Can be any key-value pair GeoDistanceMeters *map[string]int `json:"geo_distance_meters,omitempty"` // Highlight Highlighted version of the matching document Highlight *map[string]interface{} `json:"highlight,omitempty"` // Highlights (Deprecated) Contains highlighted portions of the search fields Highlights *[]SearchHighlight `json:"highlights,omitempty"` TextMatch *int64 `json:"text_match,omitempty"` // VectorDistance Distance between the query vector and matching document's vector value VectorDistance *float32 `json:"vector_distance,omitempty"` }
SearchResultHit defines model for SearchResultHit.
type SearchSynonym ¶
type SearchSynonym struct { Id *string `json:"id,omitempty"` // Root For 1-way synonyms, indicates the root word that words in the `synonyms` parameter map to. Root *string `json:"root,omitempty"` // Synonyms Array of words that should be considered as synonyms. Synonyms []string `json:"synonyms"` }
SearchSynonym defines model for SearchSynonym.
type SearchSynonymSchema ¶
type SearchSynonymSchema struct { // Root For 1-way synonyms, indicates the root word that words in the `synonyms` parameter map to. Root *string `json:"root,omitempty"` // Synonyms Array of words that should be considered as synonyms. Synonyms []string `json:"synonyms"` }
SearchSynonymSchema defines model for SearchSynonymSchema.
type SearchSynonymsResponse ¶
type SearchSynonymsResponse struct {
Synonyms []*SearchSynonym `json:"synonyms"`
}
SearchSynonymsResponse defines model for SearchSynonymsResponse.
type SuccessStatus ¶
type SuccessStatus struct {
Success bool `json:"success"`
}
SuccessStatus defines model for SuccessStatus.
type TakeSnapshotParams ¶
type TakeSnapshotParams struct { // SnapshotPath The directory on the server where the snapshot should be saved. SnapshotPath string `form:"snapshot_path" json:"snapshot_path"` }
TakeSnapshotParams defines parameters for TakeSnapshot.
type TakeSnapshotResponse ¶
type TakeSnapshotResponse struct { Body []byte HTTPResponse *http.Response JSON201 *SuccessStatus }
func ParseTakeSnapshotResponse ¶
func ParseTakeSnapshotResponse(rsp *http.Response) (*TakeSnapshotResponse, error)
ParseTakeSnapshotResponse parses an HTTP response from a TakeSnapshotWithResponse call
func (TakeSnapshotResponse) Status ¶
func (r TakeSnapshotResponse) Status() string
Status returns HTTPResponse.Status
func (TakeSnapshotResponse) StatusCode ¶
func (r TakeSnapshotResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateCollectionJSONRequestBody ¶
type UpdateCollectionJSONRequestBody = CollectionUpdateSchema
UpdateCollectionJSONRequestBody defines body for UpdateCollection for application/json ContentType.
type UpdateCollectionResponse ¶
type UpdateCollectionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionUpdateSchema JSON400 *ApiResponse JSON404 *ApiResponse }
func ParseUpdateCollectionResponse ¶
func ParseUpdateCollectionResponse(rsp *http.Response) (*UpdateCollectionResponse, error)
ParseUpdateCollectionResponse parses an HTTP response from a UpdateCollectionWithResponse call
func (UpdateCollectionResponse) Status ¶
func (r UpdateCollectionResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateCollectionResponse) StatusCode ¶
func (r UpdateCollectionResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateDocumentJSONBody ¶
type UpdateDocumentJSONBody = interface{}
UpdateDocumentJSONBody defines parameters for UpdateDocument.
type UpdateDocumentJSONRequestBody ¶
type UpdateDocumentJSONRequestBody = UpdateDocumentJSONBody
UpdateDocumentJSONRequestBody defines body for UpdateDocument for application/json ContentType.
type UpdateDocumentResponse ¶
type UpdateDocumentResponse struct { Body []byte HTTPResponse *http.Response JSON200 *map[string]interface{} JSON404 *ApiResponse }
func ParseUpdateDocumentResponse ¶
func ParseUpdateDocumentResponse(rsp *http.Response) (*UpdateDocumentResponse, error)
ParseUpdateDocumentResponse parses an HTTP response from a UpdateDocumentWithResponse call
func (UpdateDocumentResponse) Status ¶
func (r UpdateDocumentResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateDocumentResponse) StatusCode ¶
func (r UpdateDocumentResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateDocumentsJSONBody ¶
type UpdateDocumentsJSONBody = interface{}
UpdateDocumentsJSONBody defines parameters for UpdateDocuments.
type UpdateDocumentsJSONRequestBody ¶
type UpdateDocumentsJSONRequestBody = UpdateDocumentsJSONBody
UpdateDocumentsJSONRequestBody defines body for UpdateDocuments for application/json ContentType.
type UpdateDocumentsParams ¶
type UpdateDocumentsParams struct {
FilterBy *string `form:"filter_by,omitempty" json:"filter_by,omitempty"`
}
UpdateDocumentsParams defines parameters for UpdateDocuments.
type UpdateDocumentsResponse ¶
type UpdateDocumentsResponse struct { Body []byte HTTPResponse *http.Response JSON200 *struct { // NumUpdated The number of documents that have been updated NumUpdated int `json:"num_updated"` } JSON400 *ApiResponse JSON404 *ApiResponse }
func ParseUpdateDocumentsResponse ¶
func ParseUpdateDocumentsResponse(rsp *http.Response) (*UpdateDocumentsResponse, error)
ParseUpdateDocumentsResponse parses an HTTP response from a UpdateDocumentsWithResponse call
func (UpdateDocumentsResponse) Status ¶
func (r UpdateDocumentsResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateDocumentsResponse) StatusCode ¶
func (r UpdateDocumentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpsertAliasJSONRequestBody ¶
type UpsertAliasJSONRequestBody = CollectionAliasSchema
UpsertAliasJSONRequestBody defines body for UpsertAlias for application/json ContentType.
type UpsertAliasResponse ¶
type UpsertAliasResponse struct { Body []byte HTTPResponse *http.Response JSON200 *CollectionAlias JSON400 *ApiResponse JSON404 *ApiResponse }
func ParseUpsertAliasResponse ¶
func ParseUpsertAliasResponse(rsp *http.Response) (*UpsertAliasResponse, error)
ParseUpsertAliasResponse parses an HTTP response from a UpsertAliasWithResponse call
func (UpsertAliasResponse) Status ¶
func (r UpsertAliasResponse) Status() string
Status returns HTTPResponse.Status
func (UpsertAliasResponse) StatusCode ¶
func (r UpsertAliasResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpsertSearchOverrideJSONRequestBody ¶
type UpsertSearchOverrideJSONRequestBody = SearchOverrideSchema
UpsertSearchOverrideJSONRequestBody defines body for UpsertSearchOverride for application/json ContentType.
type UpsertSearchOverrideResponse ¶
type UpsertSearchOverrideResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchOverride JSON404 *ApiResponse }
func ParseUpsertSearchOverrideResponse ¶
func ParseUpsertSearchOverrideResponse(rsp *http.Response) (*UpsertSearchOverrideResponse, error)
ParseUpsertSearchOverrideResponse parses an HTTP response from a UpsertSearchOverrideWithResponse call
func (UpsertSearchOverrideResponse) Status ¶
func (r UpsertSearchOverrideResponse) Status() string
Status returns HTTPResponse.Status
func (UpsertSearchOverrideResponse) StatusCode ¶
func (r UpsertSearchOverrideResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpsertSearchSynonymJSONRequestBody ¶
type UpsertSearchSynonymJSONRequestBody = SearchSynonymSchema
UpsertSearchSynonymJSONRequestBody defines body for UpsertSearchSynonym for application/json ContentType.
type UpsertSearchSynonymResponse ¶
type UpsertSearchSynonymResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SearchSynonym JSON404 *ApiResponse }
func ParseUpsertSearchSynonymResponse ¶
func ParseUpsertSearchSynonymResponse(rsp *http.Response) (*UpsertSearchSynonymResponse, error)
ParseUpsertSearchSynonymResponse parses an HTTP response from a UpsertSearchSynonymWithResponse call
func (UpsertSearchSynonymResponse) Status ¶
func (r UpsertSearchSynonymResponse) Status() string
Status returns HTTPResponse.Status
func (UpsertSearchSynonymResponse) StatusCode ¶
func (r UpsertSearchSynonymResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type VoteResponse ¶
type VoteResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SuccessStatus }
func ParseVoteResponse ¶
func ParseVoteResponse(rsp *http.Response) (*VoteResponse, error)
ParseVoteResponse parses an HTTP response from a VoteWithResponse call
func (VoteResponse) Status ¶
func (r VoteResponse) Status() string
Status returns HTTPResponse.Status
func (VoteResponse) StatusCode ¶
func (r VoteResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode