refer the example to set indice and query string