import _m0 from "protobufjs/minimal.js"; import { ConsistencyLevel, Filters, Vectors } from "./base.js"; import { BM25, Hybrid, NearAudioSearch, NearDepthSearch, NearImageSearch, NearIMUSearch, NearObject, NearTextSearch, NearThermalSearch, NearVector, NearVideoSearch } from "./base_search.js"; import { GenerativeReply, GenerativeResult, GenerativeSearch } from "./generative.js"; import { Properties } from "./properties.js"; export declare const protobufPackage = "weaviate.v1"; export interface SearchRequest { /** required */ collection: string; /** parameters */ tenant: string; consistencyLevel?: ConsistencyLevel | undefined; /** what is returned */ properties?: PropertiesRequest | undefined; metadata?: MetadataRequest | undefined; groupBy?: GroupBy | undefined; /** affects order and length of results. 0/empty (default value) means disabled */ limit: number; offset: number; autocut: number; after: string; /** protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED */ sortBy: SortBy[]; /** matches/searches for objects */ filters?: Filters | undefined; hybridSearch?: Hybrid | undefined; bm25Search?: BM25 | undefined; nearVector?: NearVector | undefined; nearObject?: NearObject | undefined; nearText?: NearTextSearch | undefined; nearImage?: NearImageSearch | undefined; nearAudio?: NearAudioSearch | undefined; nearVideo?: NearVideoSearch | undefined; nearDepth?: NearDepthSearch | undefined; nearThermal?: NearThermalSearch | undefined; nearImu?: NearIMUSearch | undefined; generative?: GenerativeSearch | undefined; rerank?: Rerank | undefined; /** @deprecated */ uses123Api: boolean; /** @deprecated */ uses125Api: boolean; uses127Api: boolean; } export interface GroupBy { /** * currently only supports one entry (eg just properties, no refs). But might * be extended in the future. * protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED */ path: string[]; numberOfGroups: number; objectsPerGroup: number; } export interface SortBy { ascending: boolean; /** * currently only supports one entry (eg just properties, no refs). But the * weaviate datastructure already has paths in it and this makes it easily * extendable in the future * protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED */ path: string[]; } export interface MetadataRequest { uuid: boolean; vector: boolean; creationTimeUnix: boolean; lastUpdateTimeUnix: boolean; distance: boolean; certainty: boolean; score: boolean; explainScore: boolean; isConsistent: boolean; vectors: string[]; /** * query_profile enables per-shard query profiling. When true, the response includes * timing breakdowns for each shard and search type. */ queryProfile: boolean; } export interface PropertiesRequest { nonRefProperties: string[]; refProperties: RefPropertiesRequest[]; objectProperties: ObjectPropertiesRequest[]; returnAllNonrefProperties: boolean; } export interface ObjectPropertiesRequest { propName: string; primitiveProperties: string[]; objectProperties: ObjectPropertiesRequest[]; } export interface RefPropertiesRequest { referenceProperty: string; properties: PropertiesRequest | undefined; metadata: MetadataRequest | undefined; targetCollection: string; } export interface Rerank { property: string; query?: string | undefined; } export interface SearchReply { took: number; results: SearchResult[]; /** @deprecated */ generativeGroupedResult?: string | undefined; groupByResults: GroupByResult[]; generativeGroupedResults?: GenerativeResult | undefined; queryProfile?: QueryProfile | undefined; } /** * QueryProfile contains per-shard profiling data for a search query. * Only populated when MetadataRequest.profile is true. */ export interface QueryProfile { shards: QueryProfile_ShardProfile[]; } /** SearchProfile holds the profiling details for a single search type within a shard. */ export interface QueryProfile_SearchProfile { /** details contains human-readable profiling metrics keyed by metric name. */ details: { [key: string]: string; }; } export interface QueryProfile_SearchProfile_DetailsEntry { key: string; value: string; } /** ShardProfile holds profiling data for a single shard's contribution to a search query. */ export interface QueryProfile_ShardProfile { /** name is the identifier of the shard that was searched. */ name: string; /** node is the name of the cluster node that executed this shard search. */ node: string; /** searches maps search type (e.g., "vector", "keyword") to its profiling details. */ searches: { [key: string]: QueryProfile_SearchProfile; }; } export interface QueryProfile_ShardProfile_SearchesEntry { key: string; value: QueryProfile_SearchProfile | undefined; } export interface RerankReply { score: number; } export interface GroupByResult { name: string; minDistance: number; maxDistance: number; numberOfObjects: number; objects: SearchResult[]; rerank?: RerankReply | undefined; /** @deprecated */ generative?: GenerativeReply | undefined; generativeResult?: GenerativeResult | undefined; } export interface SearchResult { properties: PropertiesResult | undefined; metadata: MetadataResult | undefined; generative?: GenerativeResult | undefined; } export interface MetadataResult { id: string; /** * protolint:disable:next REPEATED_FIELD_NAMES_PLURALIZED * * @deprecated */ vector: number[]; creationTimeUnix: number; creationTimeUnixPresent: boolean; lastUpdateTimeUnix: number; lastUpdateTimeUnixPresent: boolean; distance: number; distancePresent: boolean; certainty: number; certaintyPresent: boolean; score: number; scorePresent: boolean; explainScore: string; explainScorePresent: boolean; isConsistent?: boolean | undefined; /** @deprecated */ generative: string; /** @deprecated */ generativePresent: boolean; isConsistentPresent: boolean; vectorBytes: Uint8Array; idAsBytes: Uint8Array; rerankScore: number; rerankScorePresent: boolean; vectors: Vectors[]; } export interface PropertiesResult { refProps: RefPropertiesResult[]; targetCollection: string; metadata: MetadataResult | undefined; nonRefProps: Properties | undefined; refPropsRequested: boolean; } export interface RefPropertiesResult { properties: PropertiesResult[]; propName: string; } export declare const SearchRequest: { encode(message: SearchRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SearchRequest; fromJSON(object: any): SearchRequest; toJSON(message: SearchRequest): unknown; create(base?: DeepPartial): SearchRequest; fromPartial(object: DeepPartial): SearchRequest; }; export declare const GroupBy: { encode(message: GroupBy, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GroupBy; fromJSON(object: any): GroupBy; toJSON(message: GroupBy): unknown; create(base?: DeepPartial): GroupBy; fromPartial(object: DeepPartial): GroupBy; }; export declare const SortBy: { encode(message: SortBy, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SortBy; fromJSON(object: any): SortBy; toJSON(message: SortBy): unknown; create(base?: DeepPartial): SortBy; fromPartial(object: DeepPartial): SortBy; }; export declare const MetadataRequest: { encode(message: MetadataRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MetadataRequest; fromJSON(object: any): MetadataRequest; toJSON(message: MetadataRequest): unknown; create(base?: DeepPartial): MetadataRequest; fromPartial(object: DeepPartial): MetadataRequest; }; export declare const PropertiesRequest: { encode(message: PropertiesRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PropertiesRequest; fromJSON(object: any): PropertiesRequest; toJSON(message: PropertiesRequest): unknown; create(base?: DeepPartial): PropertiesRequest; fromPartial(object: DeepPartial): PropertiesRequest; }; export declare const ObjectPropertiesRequest: { encode(message: ObjectPropertiesRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): ObjectPropertiesRequest; fromJSON(object: any): ObjectPropertiesRequest; toJSON(message: ObjectPropertiesRequest): unknown; create(base?: DeepPartial): ObjectPropertiesRequest; fromPartial(object: DeepPartial): ObjectPropertiesRequest; }; export declare const RefPropertiesRequest: { encode(message: RefPropertiesRequest, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): RefPropertiesRequest; fromJSON(object: any): RefPropertiesRequest; toJSON(message: RefPropertiesRequest): unknown; create(base?: DeepPartial): RefPropertiesRequest; fromPartial(object: DeepPartial): RefPropertiesRequest; }; export declare const Rerank: { encode(message: Rerank, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Rerank; fromJSON(object: any): Rerank; toJSON(message: Rerank): unknown; create(base?: DeepPartial): Rerank; fromPartial(object: DeepPartial): Rerank; }; export declare const SearchReply: { encode(message: SearchReply, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SearchReply; fromJSON(object: any): SearchReply; toJSON(message: SearchReply): unknown; create(base?: DeepPartial): SearchReply; fromPartial(object: DeepPartial): SearchReply; }; export declare const QueryProfile: { encode(message: QueryProfile, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryProfile; fromJSON(object: any): QueryProfile; toJSON(message: QueryProfile): unknown; create(base?: DeepPartial): QueryProfile; fromPartial(object: DeepPartial): QueryProfile; }; export declare const QueryProfile_SearchProfile: { encode(message: QueryProfile_SearchProfile, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryProfile_SearchProfile; fromJSON(object: any): QueryProfile_SearchProfile; toJSON(message: QueryProfile_SearchProfile): unknown; create(base?: DeepPartial): QueryProfile_SearchProfile; fromPartial(object: DeepPartial): QueryProfile_SearchProfile; }; export declare const QueryProfile_SearchProfile_DetailsEntry: { encode(message: QueryProfile_SearchProfile_DetailsEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryProfile_SearchProfile_DetailsEntry; fromJSON(object: any): QueryProfile_SearchProfile_DetailsEntry; toJSON(message: QueryProfile_SearchProfile_DetailsEntry): unknown; create(base?: DeepPartial): QueryProfile_SearchProfile_DetailsEntry; fromPartial(object: DeepPartial): QueryProfile_SearchProfile_DetailsEntry; }; export declare const QueryProfile_ShardProfile: { encode(message: QueryProfile_ShardProfile, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryProfile_ShardProfile; fromJSON(object: any): QueryProfile_ShardProfile; toJSON(message: QueryProfile_ShardProfile): unknown; create(base?: DeepPartial): QueryProfile_ShardProfile; fromPartial(object: DeepPartial): QueryProfile_ShardProfile; }; export declare const QueryProfile_ShardProfile_SearchesEntry: { encode(message: QueryProfile_ShardProfile_SearchesEntry, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): QueryProfile_ShardProfile_SearchesEntry; fromJSON(object: any): QueryProfile_ShardProfile_SearchesEntry; toJSON(message: QueryProfile_ShardProfile_SearchesEntry): unknown; create(base?: DeepPartial): QueryProfile_ShardProfile_SearchesEntry; fromPartial(object: DeepPartial): QueryProfile_ShardProfile_SearchesEntry; }; export declare const RerankReply: { encode(message: RerankReply, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): RerankReply; fromJSON(object: any): RerankReply; toJSON(message: RerankReply): unknown; create(base?: DeepPartial): RerankReply; fromPartial(object: DeepPartial): RerankReply; }; export declare const GroupByResult: { encode(message: GroupByResult, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): GroupByResult; fromJSON(object: any): GroupByResult; toJSON(message: GroupByResult): unknown; create(base?: DeepPartial): GroupByResult; fromPartial(object: DeepPartial): GroupByResult; }; export declare const SearchResult: { encode(message: SearchResult, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): SearchResult; fromJSON(object: any): SearchResult; toJSON(message: SearchResult): unknown; create(base?: DeepPartial): SearchResult; fromPartial(object: DeepPartial): SearchResult; }; export declare const MetadataResult: { encode(message: MetadataResult, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): MetadataResult; fromJSON(object: any): MetadataResult; toJSON(message: MetadataResult): unknown; create(base?: DeepPartial): MetadataResult; fromPartial(object: DeepPartial): MetadataResult; }; export declare const PropertiesResult: { encode(message: PropertiesResult, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): PropertiesResult; fromJSON(object: any): PropertiesResult; toJSON(message: PropertiesResult): unknown; create(base?: DeepPartial): PropertiesResult; fromPartial(object: DeepPartial): PropertiesResult; }; export declare const RefPropertiesResult: { encode(message: RefPropertiesResult, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): RefPropertiesResult; fromJSON(object: any): RefPropertiesResult; toJSON(message: RefPropertiesResult): unknown; create(base?: DeepPartial): RefPropertiesResult; fromPartial(object: DeepPartial): RefPropertiesResult; }; type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; export {};