Skip to Content
0

Text Mining - Calling function inside procedure

Nov 15, 2016 at 06:20 PM

33

avatar image

Hi - I have been playing with this SQLScript forever but cannot seem to figure why it is not working. I am getting the error "index out of bounds: param index exceeded the param size 0, but 1". Here is the code. I am trying to run the TM_GET_RELEVANT_TERMS function over all of my documents, this procedure passes an integer to the function to identify what document (pk_ID) I want the function to run for.

It works fine when I replace "DOCUMENT IN FULLTEXT INDEX WHERE "pk_ID" = :ID2" with

"DOCUMENT IN FULLTEXT INDEX WHERE "pk_ID" = 2"

DROP PROCEDURE "P_MT";
CREATE PROCEDURE "P_MT" (IN    ID2    INTEGER) LANGUAGE SQLSCRIPT AS
/*********BEGIN PROCEDURE SCRIPT ************/
BEGIN

		    SELECT RANK, NORMALIZED_TERM
		    
		    FROM TM_GET_RELEVANT_TERMS (
			DOCUMENT IN FULLTEXT INDEX WHERE "pk_ID" = :ID2
			SEARCH "Description" FROM "SYSTEM"."t_sr" 
			RETURN TOP 200
			) AS T;
		
END;


call "P_MT"(1);
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Lucas Oliveira
Nov 16, 2016 at 04:38 AM
0

Hi Matthew,

Strange. I can't see why this would not work. Do you mind sharing your catalog information (create SQL + some data) ?

BRs,
Lucas de Oliveira

Share
10 |10000 characters needed characters left characters exceeded