lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yura Smolsky <i...@altervisionmedia.com>
Subject Re[3]: how to enhance speed of sorted search
Date Tue, 26 Sep 2006 07:12:39 GMT
Hello, Chris.

CH> 3) most likely, if you are seeing "slow" performance from sorted searches,
CH> the time spent "scoring" the results isn't the biggest contributor to how
CH> long thesearch takes -- it tends to be negligable for most queries.  A
CH> better question is: are you reusing the exact same IndexReader /
CH> IndexSearcher instance for every querey? ... if not, that right there is
CH> going to be your biggest problem, because it will prevent you from being
CH> able to reuse teh "FieldCache" needed when sorting results.

Sure I do reuse IndexSearcher :) and second query is always faster
than the first one...

I am thinking should be this faster

query = QueryParser("text", StandardAnalyzer()).parse("good boy")
IndexSearcher.search(
  new ConstantScoreQuery(new QueryFilter(query)),
  sortByIntField)

than usual search

IndexSearcher.search(
  query,
  sortByIntField)

Is there anyway I could use filter to get needed results from the
query?

--
Yura Smolsky,
http://altervisionmedia.com/



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message