I have two solr replicas (let's say replica A and B) with exactly same configs for highlighting. The problem i'm having is, when I query from replica A it returns results with correct highlighting tags, but when I query from replica B it returns only a list of solr IDs as "highlighting" list.
Configurations are exactly the same, Someone please give some insights to fix this issue
solr version : 4.10.4
Thanks
It was a simple mistake after all. Seems it didn't have loaded the configs correctly, restarting the node and reindexing solved the issue.
Related
We have upgraded solr version from 7.7.2. to 8.11.1, after that we are facing issue for search result. Less result are not matching for both version. Our document list are same as it is.
Also we have using same schema and fields.
Can someone please help us on it what can be possible reason or solution or or any algorithm change happened for v8 which can result into differ?
We recently upgraded from Solr 7.3 to Solr 8.9 running Solr Cloud. We had an issue with it showing a different number of documents even though we took a backup in Solr 7 and restored to Solr 8. Eventually we discovered that in Solr 8 there were some major changes to nested documents, we do not use nested documents in our environment, however in Solr 8 it was causing some of our documents to appear with the same id resulting in those documents appearing twice causing the discrepancy. We ended up taking another full backup and then deleting all our collections/configsets. After that we deleted the root field from the managed-schema and restored. After the restore our document counts matched up. Hope this helps.
There are indexes of some solr cores which I convert them from solr4 to solr6 but in solr standalone mode. so they don't have the "version" field that solrcolud require.
Here now I want to migrate to solrcloud 6 and I need to put them under cluster. Because the version field dose not exist there in these indexes when I put them Under a solrcloud leader core on the data directory the replicas in the shard didn't update as I saw. so I decided to read them by lucene, get each doc fields, add them to a solrdoc and then put them doc by doc in solrcloud. But cause there are fields that not stored in these indexes so all fields that exist here in these indexes don't move there.
At the end it seems there is no way for me than re-indexing.
I appreciate if there is any better idea or solutions that can help me migrate more easily.
If there is any chance to reindex, just do so, it's going to be the best in the end (you have to deal with two separate issues: a) migrate from 4.X to 6.0 and b)from standalone to SolrCloud...it's going to be messy).
If you cannot reindex:
are all your fields stored OR have docValues=true? If so, you can get the original contents of your docs. Read them and index them with solrj or with some script.
if not, and you have a version field: try to manually put the index in Solrcloud. Not straighforward, but possible.
if you don't have a version field, I think it is impossible to put the index as is in Solrcloud (although some post on the net make you think it is). You could try to write some lucene code to add version field to all docs (with values that make sense), but this should be the very last resort.
I've been trying to set up CKAN, however I am facing some problems in SOLR.
Everytime I run CKAN, the SOLR log file registers a new event, and that is:
org.apache.solr.common.SolrException: sort param field can't be found: metadata_modified
I am trying to use CKAN for the first time and I have no experience at all, so I have no idea what that log event means, nor how to fix it.
EDIT:
When I reload the core at SOLR, the following is logged:
The schema has been upgraded to managed, but the non-managed schema schema.xml is still loadable. PLEASE REMOVE THIS FILE.
Could anyone help me?
Many thanks.
Well, turns out the SOLR 6, for some reason, was the problem.
Downgrading to version 5 worked for me.
This sounds like you are not using CKAN's custom Solr schema. Make sure to go over all points in the setup documentation, specially point 2, and to restart jetty afterwards:
sudo service restart jetty
I am new to Solr and have a couple of questions to ask help from more experienced people:
I am able to get example running, however what is exactly the start.jar?
I know by running "java -jar start.jar", i can start solr. But do i run this command after i index my own data, not the given sample data? if not, what should i do to run my own solr instance with my own indexed data?
I do need to index my own sample data, not related to the given example solr thing at all. How exactly should i do it? Should i copy the example directory then modify the fields in sechema.xml? should i then run the post.sh accordingly to index the data like what i did to set up the example solr?
Thanks a lot for your help!
Steps:
Decide what will be the document structure u store in SOLR. (Somewhat like creating the schema of a relational DB for one table).
remove the example core and create your own core with that schema
once the schema works with no errors (you check the server logs that hosts the SOLR app) You can start feed the data you have into SOLR. You POST it via HTTP in a specific structure which is documented in the SOLR Wiki. Various frameworks have some classes to handle that.
Marked as Wiki as this is too broad an answer for someone who did not bother to RTFM...
Dear custom indexing is not a difficult task as I have worked on it just a few days ago. First you need to write your documnet is xml,csv or json( format supported in solr) containing fields according to your schema.xml, then run following command in example/exampledocs
For a document mydoc.xml
./post.sh mydoc.xml
if in output, status value is 0 then indexing is successful and you can search your document in solr
Reference:http://www.solrtutorial.com/solr-in-5-minutes.html
Though the question is old, but I am writing for new visitors with same issue. The question can't be answered in few words. You must understand what Solr is, whats Solr Admin UI, why we need Solr instead a relational database. Then you can understand how to import sample data. I have recently published two articles i.e. Solr Introduction and Importing Sample Data, these might be helpful for you.
http://www.devtrainings.com/2017/03/apache-solr-introduction-and-server.html
http://www.devtrainings.com/2017/03/apache-solr-index-data-and-run-search.html
We are usig solr 1.4.1 Dataimport handler to build our solr index. Whenver a record on table( where the DIH queries) is updated we call the DIH with a query that updates that solr record with the new values. Right now the problem is sometimes the solr records are not updated eventhough we see on the logs that solr query have been called when there is record update on the DB side. Is there anyway we can turn on solr to show us the follwing stuff onthe logs;
Show the SQL query it's executing
Results returned ( Both the count as well as the individual records).
Tried debugQuery=true but that does not give us the No.2(above) we are looking for.
Any help would be greatly appreciated
Thanks
s
You should be able to see the sql queries fired by Solr data import handler if you change your logging level to fine or finest.
You can dynamically change the logging level for solr.
You can also use http://wiki.apache.org/solr/DataImportHandler#Commands, the debug feature to sample test you data.
debugQuery would only help you debug search results and relevance.