lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kai R. Emde" <e...@emedea.de>
Subject AW: BUG ? - lucene multisearcher / sorting
Date Fri, 01 Dec 2006 14:16:25 GMT
Thanks for the reply,

I try to explain what's happens -

we use lucene 2.0 - is a little difficult to show a case, but it seems that
the problem began, when the hits of one index reach 200 and above.
At this moment at the end of the list there are like bits lost, of this
index 1,2,3 hits.
When we search "material" as an example, we found 207 hits in the the index.
When we search this index in the multisearcher, with 3 index, there 206 hits
contiguous and one after the next. OK bookA1, bookA2, bookA3 ... bookA206,
bookB1, bookB2, bookb3 ... bookB6, bookA207, bookC1, bookC2 -- 

Here is the code with the multisearcher -

	MultiSearcher searcher = getSearcher(indexDirList);
            
	if (searcher != null) {
		Analyzer analyzer = new GermanAnalyzer();
		QueryParser qp = new QueryParser("contents", analyzer);
//$NON-NLS-1$
		try {
			query = qp.parse(queryInput);
		} catch (ParseException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		try {
		  	hits = searcher.search(query, new Sort (new
SortField[] {
				new SortField("bookisbn"),
SortField.FIELD_SCORE //$NON-NLS-1$
		   }));
		 } catch (IOException e) {
			// TODO Auto-generated catch block
		  e.printStackTrace();
		  }                        // run the query
		   		
	   hitsResult = Messages.getString("Result.24")+ hits.length() +
Messages.getString("Result.25"); //$NON-NLS-1$ //$NON-NLS-2$

Regards
Kai


-----Urspr√ľngliche Nachricht-----
Von: Daniel Naber [mailto:lucenelist2005@danielnaber.de] 
Gesendet: Donnerstag, 30. November 2006 00:23
An: java-user@lucene.apache.org
Betreff: Re: BUG ? - lucene multisearcher / sorting


On Tuesday 28 November 2006 23:09, Kai R. Emde wrote:

> we have one problem with the sort routine. We use the multisearcher 
> function over severall index.

Does that also happens when you're not using MultiSearcher? Could you post 
a small test case that demonstrates this problem? To my knowledge, there's 
no known bug (but lucene 1.4 had problems with relevance sorting when 
using MultiSearcher).

Regards
 Daniel

-- 
http://www.danielnaber.de

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




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