Re: Aggregating category hits

2006-05-29 Thread zzzzz shalev
i know im a little late replying to this thread, but, in my humble opinion the best way to aggregate values (not necessarily terms, but whole values in fields) is as follows: startup stage: for each field you would like to aggregate create a hashmap open an index reader and run

Re: search performance degrades by order of magnitude when using SortField.

2006-05-29 Thread Chris Hostetter
: default Sort.RELEVANCE, query response time is ~6ms. However, when I : specify a sort, e.g. Searcher.search( query, new Sort( "mydatefield" ) : ), the query response time gets multiplied by a factor of 10 or 20. ... : do a top-K ranking over the same number of raw hits. The performanc

Re: fastest way to get raw hit count

2006-05-29 Thread Chris Hostetter
: Scorer scorer = : query.weight(indexSearcher).scorer(indexSearcher.getIndexReader()); You'd need to rewrite the query first to be safe. A slightly higher level API approach would be a HitCollector that just counts the hits... http://lucene.apache.org/java/docs/api/org/apache/lucene/search/Hi

Re: fastest way to get raw hit count

2006-05-29 Thread Paul Elschot
On Monday 29 May 2006 15:54, z shalev wrote: > hi all, > > is there a faster way to retrieve ONLY the count of results for a query? > > lucene ranks (scores) the first batch of docs and sorts them by rank, this is functionality i dont need in certain queries and i assume, not doing

fastest way to get raw hit count

2006-05-29 Thread zzzzz shalev
hi all, is there a faster way to retrieve ONLY the count of results for a query? lucene ranks (scores) the first batch of docs and sorts them by rank, this is functionality i dont need in certain queries and i assume, not doing this can return the count faster then the hits.length()

Maybe a bug of lucene 1.9

2006-05-29 Thread hu andy
I indexed a collection of Chinese documents. I use a special segmentation api to do the analysis, because the segmentation of Chinese is different from English. A strange thing happened. With lucene 1.4 or lucene 2.0, it will be all right to retrieve the corresponding documents given the terms