I designed a campus ftp search engine. When user enter a keyword and press the search button, the program callsthe searching procedure and return the result in paged style. However, in current lucene version, I can only call the below method as i need to filter and sort the result.
*search<http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/Searcher.html#search%28org.apache.lucene.search.Query,%20org.apache.lucene.search.Filter,%20int,%20org.apache.lucene.search.Sort%29> *(Query<http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/Query.html> query, Filter<http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/Filter.html> filter, int n, Sort<http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/Sort.html> sort) The problem comes as in this procedure i has to set the third parameter n and as a result, when user click the last page link, exception will be thrown when the total number of search results excesses the *n* i specified in the program. How can i overcome this problem? I've posted this problem twice and seen no reply. Could anyone offer a hand? Thanks. -- 王巍巍(Weiwei Wang) Department of Computer Science Gulou Campus of Nanjing University Nanjing, P.R.China, 210093 Mobile: 86-13913310569 MSN: [email protected] Homepage: http://cs.nju.edu.cn/rl/weiweiwang
