luceneutil
luceneutil copied to clipboard
Include query construction time into QPS
The benchmarks starts and instantiates the TaskThreads which then calls the createTasks() method to build/create all the tasks(along with included parsed query) and pass those created tasks to TaskThread for searching and therefore including the query construction time into QPS.
Hi Shubham, thanks for taking this task, and sorry for reviewing it late, I think the PR is a little bit different than what I think it ideally should be.
So the idea of this issue is to make the benchmark more close to what production would looks like: which is a search url comes in, the server parse it to a Lucene Query, then the query is being executed and results are returned. But what we did here is still: parse all the available query strings into Lucene Queries before we do the search, which could result in: 1. not fully utilized the threads 2. If there're some queries that are created but not executed for some reason, we're counting in some extra time.
I would suggest modifying SearchTask so that we won't accept a Query object but instead a string, and then in SearchTask#go method we could do a parsing there and search, if that makes sense.
Ahh....Got it.....Thanks Patrick, this makes sense to me.