> 1. Certain requests can be sent to > different paths (handlers?). For > example, the MoreLikeThis component > can being sent to either > /select or /mlt. > > I have found these two links in the Solr wiki: > > http://localhost:8983/solr/mlt?q=id:UTF8TEST&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1&mlt.match.include=false > <http://localhost:8983/solr/mlt?q=id:UTF8TEST&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1&mlt.match.include=false> > > http://localhost:8983/solr/select?q=apache&mlt=true&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1&fl=id,score > <http://localhost:8983/solr/select?q=apache&mlt=true&mlt.fl=manu,cat&mlt.mindf=1&mlt.mintf=1&fl=id,score> > > What is the reasoning behind this setup? If I decide to > send my > MoreLikeThis requests to /mlt does this mean I can not > utilize any > /select specific calls - if there is even such a thing - > such as facets > - ? If not, can a /select path can be configured to handle > all requests > from Spellcheck to Clustering?
The url with /mlt requires MoreLikeThisHandler registered in solrconfig.xml <requestHandler name="/mlt" class="org.apache.solr.handler.MoreLikeThisHandler"> You can give a name to SearchHandler/RequestHandler registered in solrconfig. You can always access them with qt parameter. Additionally if the name starts with / then you can directly use that in URL. so /mtl and /select?qt=/mlt is the same. MLT has both SearchComponent and RequestHandler so it is a little bit confusing. Same SearchHandler/RequestHandler can be registered and used with different names. For example see dismax, partitioned and standard in example solrconfig.xml. Standard has default="true", you can call others with qt parameter. Yes, /select path can be configured to handle all requests from Spellcheck to Clustering. They are all SearchComponents. These are the default components that are available by default: <arr name="components"> <str>query</str> <str>facet</str> <str>mlt</str> <str>highlight</str> <str>stats</str> <str>debug</str> </arr> You can add new ones like Spellcheck, Clustering, TermsComponent etc. > > 1. How do you escape double character > special strings (&&, ||) in Lucene? > > http://lucene.apache.org/java/2_9_1/queryparsersyntax.html#Escaping+Special+Characters > > Do I escape the first character only (\&&) or do I > escape both? And when > do I need to escape them? A couple of tests that I > performed on the > example server provided in the Solr package were > inconclusive: I think both. \&\& QueryParser has a static String escape(String s) method for that. If you want to query those special characters you need to escape. But alternatively there are some special query parsers that do not need escaping. e.g. raw and field.