Use of index in UNIX shell scripting

I have following line of code with me in one of the shell script.

LIST=`awk -v SRV=$SRV -v GRP=$GRP -v ID=$ID '{ if (index($0, GRP) && index($0, SRV) == 2 )

Can anybody help me in understanding the code ? specifically the bold one

It looks like a syntax error. Perhaps you pasted too little, or too much. The index function takes two strings, and returns a positive number indicating where within the first the second occurs, or 0 if it does not occur. if(0) is non-true, whereas any other value is true.

Thanks Era.. May be your are correct. I have posted a new thread which will give you the thorough insight.