4

I have a heldesk application in PHP/MySQL. I want to implement realtime Full text search and I have shortlisted Solr. MySQL database will store all the data and data required for search will be imported for building Solr index. All Search requests will be handled by Solr.

What I want is

  • Real time search. The moment someone updates a ticket, it should be available for search.
  • If multiple people update the ticket simultaneously, Solr should be able to handle the commits

As per my understanding of Solr, this is how I think the system will work. A user updates a ticket -> corrresponding database records modified -> a request is sent to Solr server to modify corresponding document in index.

I have read a book on Solr and below questions are troubling me.

  1. The book mentions that

    "commits are slow in Solr. Depending on the index size, Solr's auto-warming configuration, and Solr's cache state prior to committing, a commit can take a non-trivial amount of time. Typically, it takes a few seconds, but it can take some number of minutes in extreme cases"

    If this is true then how will I know when the data will be availbale for search and how can I implemnt realtime search? Even if its taking a few seconds, it can't be real time. Also I don't want the ticket update operation to be slowed down (by adding extra step of updating Solr index)

  2. It is also mentioned that

    "there is no transaction isolation. This means that if more than one Solr client were to submit modifications and commit them at overlapping times, it is possible for part of one client's set of changes to be committed before that client told Solr to commit. This applies to rollback as well. If this is a problem for your architecture then consider using one client process responsible for updating Solr."

Doe it mean that that due to lack of transactional commits, Solr can mess up if multiple people update the ticket simultaneously?

Now the question before me is: Can I achieve the two using Solr? If yes, How?

Edit1: Yeah! I came acorss a couple of similar questions but none has a staisfactory answer. So posting again. Sorry If you find it duplicate.

1

1 Answer 1

4

The functionality that you are requesting is known as Near Realtime Search also referred to as NRT. The work on NRT is still in progress, but there have been excellent incremental improvements to this support in Solr over the last couple of years. Please refer to the following links for more details on the current (versions 1.4 - 3.5) and future (ver 4.0) support for NRT.

NRT options

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.