Skip to Content
avatar image
Former Member

Text Mining - Calling function inside procedure

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);
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Nov 16, 2016 at 04:38 AM

    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

    Add comment
    10|10000 characters needed characters exceeded