equal
deleted
inserted
replaced
68 * index. Note that the documents are ranked with |
68 * index. Note that the documents are ranked with |
69 * index 0 containing best match and index at length-1 |
69 * index 0 containing best match and index at length-1 |
70 * having the worst match. |
70 * having the worst match. |
71 */ |
71 */ |
72 virtual Document * getDocument(int32_t index) = 0; |
72 virtual Document * getDocument(int32_t index) = 0; |
|
73 |
|
74 virtual int resetDocumentCache(int32_t index, int32_t count) = 0; |
73 |
75 |
74 /** |
76 /** |
75 * Returns the amount of hits |
77 * Returns the amount of hits |
76 */ |
78 */ |
77 virtual int32_t length() = 0; |
79 virtual int32_t length() = 0; |
108 // and this someone can be only this instance |
110 // and this someone can be only this instance |
109 // |
111 // |
110 typedef std::map<int32_t, Document*> WrapperMap; |
112 typedef std::map<int32_t, Document*> WrapperMap; |
111 WrapperMap wrappers_; |
113 WrapperMap wrappers_; |
112 |
114 |
113 void destroyWrappers(); |
115 void destroyWrappers(int32_t index); |
114 |
116 |
115 |
117 |
116 /** |
118 /** |
117 * Implementors just have to make sure that the correct lucene |
119 * Implementors just have to make sure that the correct lucene |
118 * document is found and wrapped with a call to wrapDocument. |
120 * document is found and wrapped with a call to wrapDocument. |
132 void wrapDocument(int32_t index, |
134 void wrapDocument(int32_t index, |
133 lucene::document::Document * doc); |
135 lucene::document::Document * doc); |
134 |
136 |
135 |
137 |
136 Document * getDocument(int32_t index); |
138 Document * getDocument(int32_t index); |
|
139 |
|
140 int resetDocumentCache(int32_t index, int32_t count); |
137 |
141 |
138 |
142 |
139 /** |
143 /** |
140 * The documents this hitsbase will keep wrapping can be |
144 * The documents this hitsbase will keep wrapping can be |
141 * (a) owned by clucene |
145 * (a) owned by clucene |