I am going to migrate our app from Lucene 4.7 to Solr 4.7 (in cloud).
As we have some custom analysers I am interested in how complicated is deployment process with Solr Cloud.
Exactly how does it looks like with custom analysers.
I couldn't find any specific information, can anybody help me?
Regards
If you have the jars present on the hosts and inside the solr jvm classpath (or specified in the solr config as presented here : http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/example/solr/collection1/conf/solrconfig.xml) then it should not be harder than specifying the field definitions along with your custom analyzers inside the schema file
Related
I have Solr 4.10 and I have collection on it with solorconfig.xml has the value for <luceneMatchVersion> as follows:
<luceneMatchVersion>4.7</luceneMatchVersion>
Is this correct? I saw other examples that has values such as LUCENE_35 What I need to know also, how could I express LUCENE_xx from my current Solr version?
You should use:
<luceneMatchVersion>4.10.4</luceneMatchVersion>
I recommend you to check your current solr version, in my case was 4.10.4.
if you are going to reindex, then both numbers should match. The only reason you might want to have them different, is if you had and index created with say Lucene 4.7, then you would have
<luceneMatchVersion>4.7</luceneMatchVersion>
Then, you upgrade lucene to 4.10.
Now, if among the changes in between 4.7 and 4.10 there are things that work differently regarding analysis (you get the same sentence analysed in both versions and get different output as a result), then, you might want to keep the version number at 4.7, otherwise some queries that contain affected terms might not work (as they were analysed at index time in a different way than at query time). You have to asses how critical that issue might be.
That is why the recommendation is to upgrade, change the setting to the current number, and reindex. This way you are sure to avoid any issue.
If anyone is using Drupal, the Search API Solr (search_api_solr) module has config templates by version in /sites/all/modules/search_api_solr/solr-conf/.
The template README.md states the following:
The solr-conf-templates directory contains config-set templates for
different Solr versions.
These are templates and are not to be used as config-sets!
To get a functional config-set you need to generate it via the Drupal
admin UI or with drush solr-gsc. See README.md in the module
directory for details.
The module's README.md lists these instructions:
Make sure you have Apache Solr started and accessible (i.e. via port 8983). You can start it without having a core configured at
this stage.
Visit Drupal configuration (/admin/config/search/search-api) and create a new Search API Server according to the search_api
documentation using "Solr" as Backend and the connector that
matches your setup. Input the correct core name (which you will
create at step 4, below).
Download the config.zip from the server's details page or by using drush solr-gsc with proper options, for example for a server named
"my_solr_server": drush solr-gsc my_solr_server config.zip 8.4.
Copy the config.zip to the Solr server and extract.
I generated a config file for 8.x, and it uses this:
<luceneMatchVersion>${solr.luceneMatchVersion:LUCENE_80}</luceneMatchVersion>
I am trying to implement solr into sitecore but could not find any way for creating a Solr instance for the same. I have few PDFs from SDN I could find any way to create Solr instance in any. Considering that I am new to CMS I hope I could get some help here. Thank you
There are lots of resources available for setting up Solr, and integrating Sitecore.
Essentially Sitecore is ignorant with respects to how you setup Solr (barring a few exceptions), so you need to follow standard methods to set Solr up. If you are doing this on your local machine, then I recommend you simply download Solr and get it running through the provided Jetty App Server.
Once Solr is running, download the Solr Extensions from SDN, then follow the search scaling guide to integrate Solr. This really only boils down to the following;
Remove Lucene config files
Add Solr config files and binaries
Add Solr endpoint into relevant config
Generate Solr Schema via Sitecore -> Control Panel -> Search (within Sitecore)
Add Schema file to Solr Core configuration
et voila
There is a great guide here: http://www.dansolovay.com/2013/05/setting-up-solr-with-sitecore-7.html
I have developed a customization to Lucene QueryParser by changing the QueryParser.jj grammar. One way to deploy this onto Solr is to revamp the Solr war file by compiling new lucene core.
On the other hand, a new query parser on Solr level can be deployed as a binary dependency (jar) into Solr core's lib directory, which is very convenient.
Is there a similar way to deploy my customization?
Could I deploy my lucene-core binary dependency into core's lib directory or somewhere else but the Solr war file?
UPD: The comments to the answer contain the thought process behind my implementation.
UPD2: I have written a blog post on my findings: http://dmitrykan.blogspot.fi/2014/03/implementing-own-luceneqparserplugin.html
As I understand you can write your own parser (with a new name), place this jar into the lib folder and add the corresponding <queryParser> to solrconfig.xml. See an example of a query parser, implemented by John Berryman #JnBrymn.
We are using Liferay (6.1.20 EE) with Solr search engine.
Now Solr indexes everything. Can we somehow set up Solr (or Liferay) to prevent one Site from being indexed?
It means all articles documents present on that Site would not be indexed and would not be present in Solr.
1) Should this be done with Solr configurations/schema filters before Index starts?
OR
2) Should it be customized in Liferay Indexer classes (with help of Hooks or EXT) to skip content being indexed.
Thanks for your thoughts and suggestions.
Regards,
Kris
You could create a custom version of the solr-web WAR file that you need to install to make the Liferay/SOLR integration work. In the WAR file you'll find SolrIndexWriterImpl. This is the place that everything passes through that will be indexed in SOLR. You could create your own custom implementation of this class that uses the information in the SearchContext parameter, that's passed into each method, to decide if something should be indexed or not.
The latest code for solr-web can be found here: http://svn.liferay.com/repos/public/plugins/trunk/webs/solr-web/
Based on this code I was also able to create a solr-web.war that works on the more recent SOLR versions instead of the ancient 1.4.1 version Liferay uses by default.
I have installed Apache Tomcat 6 and configure Solr 1.4. Now Solr service running successfully.
In Solr 1.4 has two important file solrconfig.xml and schema.xml to configure c# application with Solr service.
But whenver I changed schema.xml file according to sql table’s field it’s stop the Solr service.
so tell me step by step to configure solrconfig.xml and schema.xml
Thanks,
Unfortunately, the question isn't clear or is too broad, so I can only give general advice and point to documentation.
But whenver I changed schema.xml file according to sql table’s field it’s stop the Solr service.
Yes, after changing your schema you either have to restart your Solr instance, or, if you are using Cores (recommended), you have to reload the changed core.
tell me step by step to configure solrconfig.xml and schema.xml
Just change the files according to your needs. The Solr package contains numerous examples, all thoroughly commented. Documentation on solrconfig.xml is here. Documentation on schema.xml is here. After making any change in solrconfig.xml you have to restart your Solr instance.
Also, when making changes to the schema, make sure you reflect those changes in your SolrNet mapping.