I’m trying to implement custom Solr FunctionQueries.
I found this tutorial online http://www.supermind.org/blog/756/how-to-write-a-custom-solr-functionquery
What I need is to know if I need to change the solr source code to be able to do that or I can write this function by reference to some solr’s .jar file.
Do you know any step-by-step tutorial to do a custom solr FunctionQuery?
Thanks.
You need not modify the Solr code.
You can implement your own Custom function Query and compile it with the Solr dependant jars.
The Custom extension classes then can be packages as separate jar file.
Command
jar -cvf ....This jar file can be dropped in the Solr external shared lib folder specified in Solr.xml. Solr will automatically load this folder.
Else, add in solrconfig.xml an element pointing to the dir where you have the jar
Solr loads the external lib folder so the custom extensions are available to it.