There doesn’t seem to be any functional difference between TermQuery and SpanTermQuery. Is there any other difference such as in search performance? I’d like to know even if the difference is minuscule.
I’m using Lucene.Net 2.9.4g if that makes a difference.
I discovered there is a noticeable performance difference between the 2 query types when the search server is under load. TermQuery is faster.
I got the following average search times with a load test using 50 concurrent users against a database with several million documents.
(There are other factors that make my averages higher than normal such as large documents, complex queries, and a less-than-ideal server. However the impact of using TermQuery vs. SpanTermQuery is clear.)