I have documents with this simple schema in Lucene which I can not change. docid: (int) contents: (text)
The user is given a list of 10,000 documents in a tree which they select to search, usually they select 5000 or so. I only want to search those 5000 documents. I have the 'id' fields. That is all. I do this now: Get the 'Hits' for all documents. Loop through all Hits looking for any 'docid' that is in the 5000 selected by the user Add found docs to a collection of found documents and return that to the UI. Is there a better way of doing this?