changing values in DB not reflecting in solr - solr

I have a solr search already implemented. It showing values in the UI. Working fine. The problem here is, if i change any data in the DB, it is not reflecting in the UI. It is showing the old values. What should i do?

Every time when you change something in DB you need to re-import data
http://localhost:8983/solr/your_core_name/dataimport?command=full-import
Make sure that handlder method is defined in solrconfig.xml
To reload a core (just in case)
I suppose you're using dataImportHandler
http://wiki.apache.org/solr/DataImportHandler
You can do it via GET method.
To reload a core: http://localhost:8983/solr/admin/cores?action=RELOAD&core=your_core_name

As suggested by "Oyeme" in above answer you should update the your core document once data is updated in db.
if your using solrj client then you can add or update document in core .
link to solrj documentation
You need to update your document through code once you updated your document when it get updated in db , do commit your changes to solr core .
for committing your changes use SolrServer.commit() method this will commit your changes to core and will appear in search.

Related

Episerver updating database via sql query

I have to import a large amount of data into an episerver instance. It's much too slow to do it via the API. I'm trying to update the database directly. I'm updating properties of a block, so I update tblContentProperty. The update works but I don't see the change in the CMS. So I am either updating the wrong thing, or it's somehow cached?
I don't think I am updating the wrong thing because if I update the property through the UI, I can see the property in tblContentProperty getting updated. But running the Sql query doesn't seem to get reflected in the UI.
Do I need to clear the cache somehow?

How to sync file system synonym.txt file changes with SOLR UI?

I am trying to reload my core after updating the synonyms.txt file. Ideally, When I save changes in my synonyms.txt file then it should reflect the same changes when I open that file in SOLR UI. Post that I perform a core reload. In my case I am not able to see the file system changes on SOLR UI.
Solr version - 5.3
you mention solrcloud tag, so if you are using solrcloud, you know about uploading conf files to zookeeper etc right?
look for 'upconfig' in this doc

How to load the data into Solr from Kettle.?

Is there any way to load data into Solr from Kettle.?
I have tried some plug ins, but it does not seems to be working..
I want to index the data into Solr from Kettle. I want to give input as file/table/csv and output as Solr.. How this can be done.?
I have completed creating custom plugin to load the data into Solr. But, the problem now is, the HttpSolrServer class i have used is accpepting SolrInputDocument with one field only. Its throwing no such method error if the document has more than one field.

How to index new data with Solr 4.0 when the database is updated?

I have a database populated with fetched and parsed web pages. Does Solr know automatically which of the columns are updated to index only the changes? Or should i make my own java code or something else (like conf. changes) to check if there are any changes?

Data conflict resolution in Silverlight with WCF Service

When using Silverlight together with a WCF Services library how do you solve the age old possibility of two different users loading a record, making different changes to that record and then updating. In other words when updating how does the WCF service know that the data it retrieved is the same as the data it fetched before applying an update?
Do you need to check the original loaded values against the values in the database (i.e. recall the original query before updating)?
I was hoping that there would be a more out-of-the-box answer.
Do you mean using EntityFramework? If so, here is the strategy I used :
When retrieving data on the client side you see that the "RowState" property of the entity is gone. What I did is I added the property on the client side using the "partial class" feature. And I manage locally the value of that RowState value.
When the data goes back to the server for update only send what has been modified filtering by the "RowState" property.
On your Update method, call the ApplyCurrentValues() method of the object.
Maybe there is a better solution for that, but that's what I am using on my project; and it works well on my case :)
Good luck

Resources