I have a holdesk application in PHP / MySQL. I want to implement real-time full-text search, and I have a Solr list. The MySQL database will store all the data and data needed for the search will be imported to create the Solr index. All search requests will be processed by Solr.
I want to
- Real time search. At the moment when someone updates the ticket, he must be available for search.
- If several people renew their ticket at the same time, Solr should be able to process commits.
According to my understanding of Solr, I think the system will work. The user updates the ticket β the corresponding database entries, changed β the request is sent to the Solr server to change the corresponding document in the index.
I read a book about Solra, and below I am worried about questions.
The book mentions that
βSlow in Solr. Depending on the size of the Solr index, the autosave configuration and the state of the Solr cache before committing, commit can take a non-trivial amount of time. It usually takes a few seconds, but it can take a few minutes in extreme cases.β
If so, then how do I know when the data will be searchable and how can I do a real-time search? Even if it takes a few seconds, it may not be in real time. Also, I do not want to slow down the ticket update operation (adding an additional step to update the Solr index)
It is also mentioned that
βThere is no transaction isolation. This means that if more than one Solr Client had to make changes and overlapping times, it is possible for part of one client set to change before it tells Solr to commit. This also applies to rollback If this is a problem for yours then consider using the single client process responsible for updating Solr. "
Does this mean that due to the lack of transactional commits, Solr can go bad if several people renew the ticket at the same time?
Now the question is before me: can I achieve two using Solr? If so, how?
Edit1: Yes! I met several similar questions, but none of them received a satisfactory answer. So, send again. Sorry if you found it duplicate.
Varun source share