Solr Data Import Scheduling from MySQL - solr

I am a newbie to Solr, I m trying to schedule an import from MySQL to Solr.
The full-import functionality is working fine when I my trying to import data from Solr admin, but when I am trying to configure the data-import through the documentation provided on apache site, I am not able to move forward.
Just after adding the listener to solr web.xml file, my solr is going down and not coming up. Also as mentioned in the documentation there should be dataimport.properties file on solr.home/conf/ path. But I don't have that path also for my solr4.1

I'm the author of the scheduling component.
Take a look here for more info: https://github.com/mbonaci/solr-data-import-scheduler

Related

How to fix or remove Solr configuration?

I'm trying to set up Solr on RHEL as a better search engine for Drupal and admittedly I don't really know what I'm doing. I've installed Solr and am now trying to create a core. While crafting the URL, I accidently clicked on it and now I have a unusable configuration. I'm getting this error:
ylncore-name: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core ylncore-name: Error loading solr config from /var/solr/data/path/to/dir/conf/solrconfig.xml
I deleted the core via the dashboard and from the command line which didn't help. I've grepped across the drive for files with the path but can't find any. Web searching makes it sound like I have to do something with Zookeeper but I don't know what. How do I fix or delete the config so that I can start over?

How to make config changes take effect in Solr 7.3

We are using solr.SynonymFilterFactory with synonyms.txt in Solr during querying. I realized that there is an error in synonyms.txt, corrected it and uploaded the new file. I can see the modified synonyms.txt from Admin. But it looks like the queries are still using the old synonyms.txt. I am executing test queries from Admin with debugQuery=true and can see the synonyms getting used. How can this be fixed? It is a production environment with 3 nodes using zookeeper for management.
You'll need to reload your core for the changes to take effect.
In a single-node Solr you can do that from the Admin page: go to Core Admin, select your core, and hit Reload. This will slow down some queries but it shouldn't drop queries or connections.
You can also reload the core via the API:
curl 'http://localhost:8983/solr/admin/cores?action=RELOAD&core=your-core'
I am not sure how this works on an environment with 3 nodes, though.

How to set Data Import Handler and Scheduler using solrJ Client

I am new to solr search, i have completed a simple search.
Now I want to index documents directly from Database and want set scheduler or trigger for updating index when there is any change in DB.
I know that I can do it with DataImportHandler but can't understand its flow.
can you help me that from which steps I should have to start this process?
or can anyone just give me pointers to do this ??
I want to do this all things using SolrJ client.
This task requires many parts to work together. Work through https://wiki.apache.org/solr/DataImportHandler
DataImportHandler is a Solr component, which means that it runs inside the Solr instance. All you have to do is configure Solr and than run the DHI through the Dataimport Screen.
On the other hand SolrJ is an API that makes it easy for Java applications to talk to Solr. So you can write your own applications that create, modify, search and delete documents to Solr.
try to do simple edit and delete function on button click event and
send the id with that url in servlet and do your jdbc opertaion
after that successfully commited, call your data import command from solrj and redirect it to your index page
thats it.

Data Import Handler in sunspot rails

I have some tables in mysql. I want to import some data using data import handler and index those using Solr. Is it possible?. I saw we need to make some modifications in data-config.xml file from this link. Is it possible to use DataImportHandler in Sunspot Rails?
If so, When I execute a rails application when this data import takes place.Because with rails application I believe it is not possible to give DIH commands such as fullimport,deltaimport etc.
Please help me to resolve since I'm little confused with interaction between DIH and solr and the flow of those programs.

Finding or configuring Solr home directory

I'm following this tutorial on setting up django-haystack and solr: http://django-haystack.readthedocs.org/en/latest/tutorial.html
I hit a stumbling block here:
If you’re using the Solr backend, you have an extra step. Solr’s
configuration is XML-based, so you’ll need to manually regenerate the
schema. You should run ./manage.py build_solr_schema first, drop the
XML output in your Solr’s schema.xml file and restart your Solr
server.
Where is my schema.xml file located? It says it should in the Solr home directory and the .conf folder. But where is the Solr home directory, and/or how do I configure its location?
The solr home is the place where you can find your schema.xml and solrconfig.xml, as well as some other files depending on the text analysis you're using (dictionaries for stemming, stopwords etc.), and where your index gets created by default.
There are a couple of ways to configure the solr home, since it is located outside of the servlet container:
solr.solr.home java system property (most used one)
java:comp/env/solr/home for JNDI lookup
You can either check your servlet container configuration or go to the Solr admin page http://host:port/solr/admin, which prints out the actual solr home location together with other information about the solr instance running.
First check whether your Solr instance is working.
Got to -> http://localhost:8983/solr
If you can see a Solr web panel you have a live Solr instance.
Now go to Java Properties
Here you will see the the variables. This is where you can find the home DIRs
Note schema is now managed. If you want to override this you will have to hack it a bit. check here

Resources