That sounds like Nagle's algorithm. http://en.wikipedia.org/wiki/Nagle's_algorithm#Interactions_with_real-time_systems
On Sun, Oct 30, 2011 at 2:01 PM, <dar...@ontrenet.com> wrote: > Another interesting note. When I use the Solr Admin screen to perform the > same query, it doesn't take as long. Only when using SolrJ and Http Solr > server connection. > > > > >> I am running Solr 3.4 in a glassfish domain for > >> itself. I have about 12,500 documents with a 100 or so > >> fields with the works (stored, termv's, etc). > >> > >> In my webtier code, I use SolrJ and execute a query as > >> such: > >> > >> long querystart = > >> new Date().getTime(); > >> > >> System.out.println("BEFORE QUERY TIME: " + (querystart - > >> startime) + " milliseconds."); > >> > >> 1. QueryResponse qr = > >> solr.query(aquery, METHOD.POST); > >> long queryend = > >> new Date().getTime(); > >> > >> System.out.println("QUERY TIME: " + (queryend - querystart) > >> + " milliseconds. Before QUERY TIME." + (querystart - > >> startime)); > >> > >> The Qtime in the response reads 50-77. But line 1. takes > >> anywhere from 5 - 13 seconds to complete. > >> > >> Here is query: > >> {!lucene q.op=OR df=text_t} ( kind_s:doc OR kind_s:xml) AND > >> (( item_sm_t:[* TO *] )) AND (usergroup_sm:admin) > >> > >> What could be causing this faulty delay? > > > > QTime does not include the time that is spend while response travels from > > solr server to client. > > > >