Hi, I am currently looking at the StoredFieldVisitor visitor to make the conversion from Documents into my own search results more efficient. My current code looks like this:
Document doc = searcher.doc(id); ISearchResult result = convert(doc); My convert(Document) method creates, depending on a dedicated "type" field of the Document, one of several different subtypes of ISearchResult and then copies over the Document's field data into the newly created object. Obviously, going through an intermediate Document object is wasteful. Hence, I want to use a StoredFieldVisitor that directly produces ISearchResults. In order to create the correct subtype of ISearchResult, however, I would need so assurance that my "type" field is visited first. Is this possible? Best wishes, Andreas -- Codetrails GmbH The knowledge transfer company Robert-Bosch-Str. 7, 64293 Darmstadt Phone: +49-6151-276-7092 Mobile: +49-170-811-3791 http://www.codetrails.com/ Managing Director: Dr. Marcel Bruch Handelsregister: Darmstadt HRB 91940 --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org