JDBC-river not working

How to index mysql table using JDBC-river plugins in java program ?
How to write search Query in java program over indexed data?

Any body answer this