Classpath for Solr Plugins
Hi! We have developed a custom tokenizer for Solr 4.3. Our Solr Server is started as a war file inside of a java application using jetty. When the custom tokenizer is in the class path oft the enclosing java application Solr fails on startup. The error is ClassCastException ArabicLetterTokenizer which is a class we don't use in our system. We can put the custom tokenizer in the Solr classpath from any other location but it needs to reside in the classpath of the enclosing application due to the overall architecture of our system. The solution to our problem was to manipulate Jettys class loading behaviour: Server server = new org.eclipse.jetty.server.Server(); WebAppContext webapp = new WebAppContext(); webapp.setParentLoaderPriority(true); // <-- this line server.setHandler(webapp); ... Using setParentLoaderPriority( true ) solved all our classpath problems. We didnt even have to use any oft the various methods to load the custom tokenizer in the Solr class path. My questions: 1) This method works too good and is too simple to implement, where is the drawback? 2) If there is no drawback why is it not mentioned in the Solr Doc in https://wiki.apache.org/solr/SolrPlugins ? Thank you very much Jan
Unexpected behaviour for bracket
Hi fellow Solr users, I use Solr in an application for full text search in textual data and I spent a lot of time debugging a strange behaviour of Solr. When I search for (ABC) then I want results with (ABC) in brackets only. But I get results for ABC also, without brackets. I tried several ways how to formulate the query: q=rawText:\(ABC)\ q=rawText:"(ABC)" q=rawText:"\(ABC\)" But all of them find results for ABC also. Can you give me a hint why my Solr instance seems to ignore brackets? Thank you very much Jan