hello-- i'm trying to figure out the best way to limit a query to a small subset if a lucene index's documents, and i'm a bit of a novice and a bit stumped...
my scenario is: 1) search the index for a term (very boring normal case) 2) take the top 5 results from that search result set 3) next, do a MoreLikeThis query where ONLY those 5 documents are valid to search against (BTW, the MLT query is based on a separately supplied doc which needs to be compared) hoping this scenario makes some sense... should i put together a boolean query with the 5 doc ids, a la: "id:282707 OR id:389447" or should i try to set up a QueryFilter with a list of document ids? and any pointers as to what the syntax should be to add doc ids to a QueryFilter? also, is it possible that Lucene in Action (which i have) is a bit out of date in this area now? any thoughts would be greatly appreciated... best-- --chris sizemore http://www.bbc.co.uk/ This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this.