Hi

Is there any performance gain of writing Lucene queries (query objects)
rather than parsing Lucene query strings using QueryParser. I believe
parser has its own overhead.

Example:
Term lTerm1 = new Term("rs", "9971000001");
Term uTerm1 = new Term("rs", "9971000004");
TermRangeQuery trQuery1 = new TermRangeQuery("rs", lTerm1.bytes(),
uTerm1.bytes(), true, true);

VS

Parsing the below string using QueryParser and then perform search.
Query q = new QueryParser("def", analyzer).parse("rs:[9971000001 TO
9971000004]");



-- 
Rajnish

Reply via email to