Changeset 9852
- Timestamp:
- 2005-05-10T16:44:39+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/recpt/formattools.cpp
r9745 r9852 42 42 43 43 static text_t format_summary (const text_t& collection, recptproto* collectproto, 44 ResultDocInfo_t &docinfo, displayclass &disp, 45 text_tmap &options, ostream& logout); 46 static text_t format_text (const text_t& collection, recptproto* collectproto, 44 47 ResultDocInfo_t &docinfo, displayclass &disp, 45 48 text_tmap &options, ostream& logout); … … 1513 1516 } 1514 1517 case comDoc: 1515 return options["text"]; 1518 return format_text(collection, collectproto, docinfo, disp, options, logout); 1519 //return options["text"]; 1516 1520 case comImage: 1517 1521 return expand_metadata(options["DocImage"], collection, collectproto, docinfo, disp, options, logout); … … 1560 1564 1561 1565 1566 // we have only preloaded the text in DocumentAction. But you may want to get the text in query. so copy what we have done with format_summary and get the text here. probably is quite expensive? 1567 text_t format_text (const text_t& collection, recptproto* collectproto, 1568 ResultDocInfo_t &docinfo, displayclass &disp, 1569 text_tmap &options, ostream& logout) { 1570 if(!options["text"].empty()) { 1571 return options["text"]; 1572 } 1573 // else get document text here 1574 DocumentRequest_t docrequest; 1575 DocumentResponse_t docresponse; 1576 comerror_t err; 1577 docrequest.OID = docinfo.OID; 1578 collectproto->get_document (collection, docrequest, docresponse, err, logout); 1579 return docresponse.doc; 1580 1581 } 1582 1562 1583 /* FUNCTION NAME: format_summary 1563 1584 * DESC: this is invoked when a [Summary] special metadata is processed.
Note:
See TracChangeset
for help on using the changeset viewer.