FYI, I have seen a number of posts about the performance. It certainly can be improved, including turning on ehcache.
Here is some benchmarking from a Dev VM (running on a shared server). The VM has 8 CPUs (shared) allocated and 6 GB of RAM.
The query is basically if ((A or
and C and D and E and ((start date < today) and (end date > today)). It returns 23 documents. Apache bench ran 100 concurrent queries for a total of 10000 calls in 70 seconds. Basically 7 msec per query on what is effectively a laptop running multiple VMs.
ab -n 10000 -c 100 'http://localhost:1876/lscs/v1/document?q=((param1:2014)OR(param2:2014_1))AND(Type:A)AND(Terms:B)AND(SomethingElse:false)AND(yetAnother:*)AND(Start_Date
=2010-04-21)AND(End_Date:<=2018-04-21)&project=myproject&max=200'
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
Completed 4000 requests
Completed 5000 requests
Completed 6000 requests
Completed 7000 requests
Completed 8000 requests
Completed 9000 requests
Finished 10000 requests
Server Software: Apache-Coyote/1.1
Server Hostname: localhost
Server Port: 1876
Document Path: /lscs/v1/document?q=((param1:2014)OR(param2:2014_1))AND(Type:A)AND(Terms:B)AND(SomethingElse:false)AND(yetAnother:*)AND(Start_Date
=2010-04-21)AND(End_Date:<=2018-04-21)&project=myproject&max=200
Document Length: 5789 bytes
Concurrency Level: 100
Time taken for tests: 70.2508 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 59610000 bytes
HTML transferred: 57890000 bytes
Requests per second: 142.85 [#/sec] (mean)
Time per request: 700.025 [ms] (mean)
Time per request: 7.000 [ms] (mean, across all concurrent requests)
Transfer rate: 831.57 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.5 0 15
Processing: 49 696 85.1 692 1080
Waiting: 48 696 85.1 692 1079
Total: 62 696 84.9 692 1080
Percentage of the requests served within a certain time (ms)
50% 692
66% 727
75% 750
80% 764
90% 805
95% 836
98% 874
99% 899
100% 1080 (longest request)