Skip to main content
Ramesh Belavadi 님이 #Salesforce Developer에 질문했습니다

When i use below type of query in SOQL in apex it is failing

 

select v.score__c as Score, c.chunk__c as Chunk from vector_search(TABLE(Resort_Information_index_dlm), 'what is canecl policy', '', 10) v join Resort_Information_chunk_dlm c on v.RecordId__c = c.Recordid__c order by Score desc 10

 

It gives error

->  System.QueryException: unexpected token: '('

 

I have adopted this from RAG, example

-> https://www.youtube.com/watch?v=ZBDv4tDfzW4

The same works in data cloud editor.

 

Please let me know if there is any solution.

답변 3개
  1. 2024년 12월 3일 오전 4:21

    @Ramesh Belavadi,

    To achieve similar functionality, you can break down the process into multiple steps using Apex. For example, You Could Use an Apex method to perform the vector search and retrieve the results, then use the results from the vector search to query the related Resort_Information_chunk_dlm records. Combine the results in Apex to achieve the desired output.