MCPcopy Index your code
hub / github.com/simstudioai/sim / getSearchResultFields

Function getSearchResultFields

apps/sim/app/api/knowledge/search/utils.ts:124–152  ·  view source on GitHub ↗
(distanceExpr: any)

Source from the content-addressed store, hash-verified

122
123/** Common fields selected for search results */
124const getSearchResultFields = (distanceExpr: any) => ({
125 id: embedding.id,
126 content: embedding.content,
127 documentId: embedding.documentId,
128 chunkIndex: embedding.chunkIndex,
129 // Text tags
130 tag1: embedding.tag1,
131 tag2: embedding.tag2,
132 tag3: embedding.tag3,
133 tag4: embedding.tag4,
134 tag5: embedding.tag5,
135 tag6: embedding.tag6,
136 tag7: embedding.tag7,
137 // Number tags (5 slots)
138 number1: embedding.number1,
139 number2: embedding.number2,
140 number3: embedding.number3,
141 number4: embedding.number4,
142 number5: embedding.number5,
143 // Date tags (2 slots)
144 date1: embedding.date1,
145 date2: embedding.date2,
146 // Boolean tags (3 slots)
147 boolean1: embedding.boolean1,
148 boolean2: embedding.boolean2,
149 boolean3: embedding.boolean3,
150 distance: distanceExpr,
151 knowledgeBaseId: embedding.knowledgeBaseId,
152})
153
154/**
155 * Build a single SQL condition for a filter

Callers 3

executeVectorSearchOnIdsFunction · 0.85
handleTagOnlySearchFunction · 0.85
handleVectorOnlySearchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected