In order to use your new QueryFunction, you must deploy it to the Discovery Framework.
Theyour-query-filter-name-filter|config directory that you created contains an ant build file. The ant deploy task places a .jar file containing the custom QueryFunction into the endeca-portal/tomcat-<version>/lib/ext directory.
Restart the Discovery Framework so that the portal picks up the new class file.
Once you have deployed your custom QueryFunction, you can use it in any component.