lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re[2]: how to enhance speed of sorted search
Date Tue, 26 Sep 2006 00:30:32 GMT

: but searcher.explain returns that idf's and scores were still counted.
: correct me if i am wrong.

1) search.explain doesn't know anything about any sorting, so you can't
trust it to tell you wether or not scores are computed when doing a custom
sort.

2) Lucene does in fact "score" the matches when executing a search before
it does any sorting -- this is because for most queries, a non-zero score
is what indicates a match.  there has been some discussion (in LUCENE-584
whose patches blur the lines of matching/scoring/filtering) about
optimizing that behavior away when relevent, but that's probably a ways
off.

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



:
: MAENN> AFAIK when you sort Lucene does not calculate the relevance
: score.
:
: MAENN> Aviran
: MAENN> http://www.aviransplace.com
:
: MAENN> -----Original Message-----
: MAENN> From: Yura Smolsky [mailto:info@altervisionmedia.com]
: MAENN> Sent: Monday, September 25, 2006 4:39 AM
: MAENN> To: java-user@lucene.apache.org
: MAENN> Subject: how to enhance speed of sorted search
:
: MAENN> Hello, java-user.
:
: MAENN> I have a set of documents with two fields:
: MAENN> 1. "summary" which is tokenized, stored. it contains some text 2.
: MAENN> "date", which is untokenized, stored. it contains seconds from epoch
: MAENN> aligned to the right and padded with zeroes on the left
:
: MAENN> I perform searches which are sorted by "date" field.
: MAENN> my query is phrase one - summary:"some text bla bla"
: MAENN> my sort is SortField("modified", SortField.INT, True)
:
: MAENN> I don't need to sort documents using "summary" field by relevance. I
: MAENN> think that by default Lucene spends some operations to score documents
: MAENN> using query.
:
: MAENN> Is there any way to speed up queries? Maybe should I replace query with
: MAENN> filter?
:
: MAENN> The problem that I have very big index, like 80 Gb and I have a lot of
: MAENN> different queries (about 480 per minute).
:
: MAENN> --
: MAENN> Yura Smolsky
:
:
: MAENN> ---------------------------------------------------------------------
: MAENN> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
: MAENN> For additional commands, e-mail: java-user-help@lucene.apache.org
:
:
:
:
:
: --
: 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
:



-Hoss


---------------------------------------------------------------------
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