Published: 30 April 2019
Have you ever been faced with a challenge when Sitecore search doesn’t work on your server? If the answer to this is yes then you’re in the right place… the tool I’m exploring below will be sure to make your development life easier!
Let’s imagine that something related to Solr search doesn’t work on your server... To find out what is wrong, you would need to use Solr console, your next steps would then be:
- Connect to remote desktop on the server, where Sitecore site is hosted
- Find ContentSearch.Solr.ServiceBaseAddress Sitecore settings value
- Open a browser on a remote desktop session and navigate to Solr URL
This process has some inconveniences:
- There is a possibility that you will not have access to the remote server, depending on your company or client policy
- If it is your internal company test server, where are hosted many sites, you and your colleagues will “fight” for sessions that are allowed on the server, kicking off each other
- Working on a remote desktop has some lag which means it's not as convenient as using your local machine
Last year I probably opened Solr console through a remote server more than 100 times; that’s why I decided to improve this process! Sitecore websites can play the role of the proxy server and transfer requests to real Solr admin panel. So, I have created a Sitecore module.
Here’s how to use it:
- Download Sitecore update package from AppVeyor
- Install update package using update installation wizard /sitecore/admin/UpdateInstallationWizard.aspx
- Open URL of Solr proxy https://yourwebsite/solr
Optional steps, if you want to use HTTP handler instead of injecting into HttpRequestBegin pipeline:
- Open Web.config file and add handler configuration>system.webServer>handlers :
<add verb="*" path="solr/*" type="Foundation.SorlProxy.SolrHandler, Foundation.SorlProxy" name ="SolrHandler" />
- Add "/solr" to IgnoreUrlPrefixes Sitecore setting (Sitecore.config Sitecore>Settings>Setting[name="IgnoreUrlPrefixes"])
- Disable Foundation.Solr.Proxy.config configuration file
If you want to know more about how this module works or have any issues, look on GitHub repository, where all sources are located.
If you’d like to read more of my helpful developer tips please head over to my author page.