I used the example from the tutorial of Apache SOLR 4.0 (http://lucene.apache.org/solr/4_0_0/tutorial.html) and implemented the same on around 8 million documents. The document has three fields namely title, id and features. There 8 million docs are basically html files converted to XML files where title contains the title of the html page and features contain the text in the body part of the html file.
Now, searching is easy but is taking time. If I search for some term, search is fast but if the query is something like “burgers in america and canada” then the query takes a lot of time ~ 5 seconds.
How do I optimize the same so that the search is faster?
Have you read the Wiki about performance? Also take a look at this document.