Full Text Search Functions

Rjydthnjh RELATIONAL DATABASE MANAGEMENT SYSTEM Linter Standard Linter Bastion Linter RealTime Linter Multiversion Full Text Search Functions RELA...
5 downloads 0 Views 443KB Size
Rjydthnjh

RELATIONAL DATABASE MANAGEMENT SYSTEM

Linter Standard Linter Bastion Linter RealTime Linter Multiversion

Full Text Search Functions

RELATIONAL EXPERT SYSTEMS

Trademarks RELEX™, LINTER®, NEVOD®, LAB™, LAKUNA are trademarks of «Relational Expert Systems, Ltd.» (hereafter, "RELEX"). Other names and brandings are trademarks of their manufacturers, sellers or developers. Intellectual Property All rights to LINTER®, NEVOD®, LAB™, and LAKUNA belong to RELEX (1990–2015). All right reserved. This particular document is property of RELEX. No part of this document can be reproduced, transmitted, reformed, saved in an information search system, translated to another language or computer language in any form, by any electronic, mechanic, magnetic, optical, chemical, manual or other means without prior permission of RELEX. About the Document The material of this document has gone through cautious examination, but RELEX does not guarantee that the document contains no errors or omissions. RELEX reserves the right to bring in corrections and alterations, to reconsider and update contained information at any moment. Address Office: 119 20-letiya Oktyabrya St., Voronezh, 394006, Russia Phone / Fax: +7 (473) 2-711-711, 2-778-333 e-mail: [email protected]. Technical Support Software product support and maintenance division: 0Phone: +7 (473) 2-711-711 from 9:00 to 18:00 MSK (UTC+3) e-mail: [email protected], [email protected]. To improve the quality of developed software and delivered services, RELEX provides an automated system of filing and processing the reclamations. We request that you report us on any detected defects and errors in software products and/or documentations on our Internet website reclamation.

Table of Contents Introduction ................................................................................................................................................... 2 Document Purpose ..............................................................................................................................2 Document Assignment.........................................................................................................................2 Required Knowledge ...........................................................................................................................2 Accepted Designations and Agreements............................................................................................2 Additional Documents..........................................................................................................................3 Basic Concepts ............................................................................................................................................... 4 Application Conditions ................................................................................................................................. 5 Filters.............................................................................................................................................................. 6 Filter Management ...............................................................................................................................7 Creating an Internal Filter................................................................................................................7 Deleting a Filter ...............................................................................................................................8 Altering an External Filter................................................................................................................9 Column Filters .................................................................................................................................9 File Filters ......................................................................................................................................11 Word Selection Rules....................................................................................................................12 Indexing........................................................................................................................................................ 14 Creating a Phrase Index ....................................................................................................................14 Filter Selection Rules .........................................................................................................................15 Altering a Phrase Index......................................................................................................................16 Updating a Phrase Index ...................................................................................................................17 Deleting a Phrase Index ....................................................................................................................17 Management ................................................................................................................................................ 18 Search ................................................................................................................................................18 Phrase Search Template...................................................................................................................19 Full Text Search Examples................................................................................................................23 Functions............................................................................................................................................24 Locating the Required Text Elements ..........................................................................................24 Text Sorting ...................................................................................................................................26 Phrase Index Creation Time .........................................................................................................27 Forming an EXTFILE Type Value.................................................................................................28 Receiving a File Type Column Value ...........................................................................................29 Receiving a Filter Number ............................................................................................................29 File Update Date ...........................................................................................................................30 External File Size...........................................................................................................................30 External File Directory...................................................................................................................31 Attachment. SQL Extensions ..................................................................................................................... 32 Alphabetical Index of Operators and Functions ...................................................................................... 33

Full Text Search

I

Introduction Document Purpose This document describes the opportunities of full text (phrase) search in DBMS LINTER. This document can be applied to work with any version of DBMS LINTER. The special features of particular versions are specified further in the text.

Document Assignment This document is intended for programmers developing applications based on DBMS LINTER.

Required Knowledge The basics of relational databases and SQL database language are essential for operating the full text search.

Accepted Designations and Agreements Designations Italic type

Example Raster is an image data …

Definition A new term in the text

Boldface type

In this case it is necessary to move all physical files. For more information about application performance see www.linter.ru. Execute the command

Highlighting in the text

Underlined type

Text divided with 

Internet website address

Command execution sequence

View  Properties

Text enclosed in < > with + + between them

Keyboard keys are enclosed into< >, the + symbol means key combination Command line text

Large monospaced text

SQL> _q

Small monospaced text

Page Time Count

Program text

Capital letters

BROWSE

Italics type in < >

< return statement>

Command names, words reserved in SQL, key words Specified element of a semantic phrase Equality by definition. The defined notion stands to the left of the symbol, concept definition itself stands to the right Optional phrase elements. In this particular example the keys are non-

::= Character

Square brackets [ ]

2

DBSTORE [-d –n –o –p –r –t –u]

Full Text Search

Предисловие Designations

Example

Definition obligatory command elements

Vertical line |

::= | NULL

Curved brackets { }

CODEPAGE {866 | 1251 | KOI8} Column characteristics MAKE CHAR(20) MODEL CHAR(20) ... SQL>

Specifies that all previous elements of the list are optional and can be replaced with any other element of the list after this line Specifies that all elements inside are a single whole

Elision marks «…»

Elision marks with a comma inside «.,..»

Text with  against gray background



Specifies that the previous part can be repeated any number of times or continued analogously

Specifies that the previous operator part which consists of several elements divided by commas can be repeated a random number of times If the page layout configuration Note ignores the properties, the command will be executed inappropriately.

Additional Documents 

DBMS LINTER. DBMS Architecture.



DBMS LINTER. SQL Guide.



DBMS LINTER. Exit Codes Guide.

Полнотекстовый поиск

3

Basic Concepts The concept of a “full text” (or phrase) search implies retrieval of text, based on a word or phrase, from the complete text or from all of the text fields in a database. As a rule, every text document has its own internal structure: paragraphs, headings, signature indents, tables. With the help of a text editor, this inner structure can be made fairly complex – we can use various fonts, make lists, do formatting etc. Also, different text editors store data in different formats (.doc, .html, .rtf, .txt. etc.). Some documents (such as those in html format), apart from using means of visual presentation of information, have their inner structure marked out, e.g., headings, body text, key words. Thus, a requirement for a full text search is recognition of a text’s structure and the ability to decode various document formats using converters or filters. DBMS LINTER phrase search tools are recommended for use in projects requiring high performance and phrase searches through large data warehouses, e.g., Web servers. Phrase search tools make it possible to simplify the data storage scheme in an application and minimize the number of required tables. The phrase search system provides: a wide variety of word search options including search by beginning, by end, by substring, by whole words, using wild cards etc.;  search by misspelled words, a fuzzy search. The system recognizes three main types of mistakes: transposition, omission, substitution of a letter;  case-sensitive or case-insensitive search;  search of close-spread words and phrases with specified word order;  search by name and attribute value in files with hypertext markup;  an automatic recognition of Russian text encoding. DBMS LINTER version 6.0 or later additionally provides:  support of multibyte encodings and hieroglyphic characters;  information storage in UNICODE encoding. 

4

Full Text Search

Application Conditions To perform phrase searches, the following requirements must be met: 1) the $$$FILTER and $$$EXTENSION system tables (see below) must exist in the database to support the phrase search system. To create and upload these tables, the files search.sql and default.sql are executed. These files are delivered as part of the Linter distribution kit and can be found in the DICT sub-directory (only for Linter versions with support of phrase search); 2) external filters, see below, are required for processing documents with formats other than those handled by the internal filters; 3) some files in PDF format may require additional transcoding files. Standard transcoding files can be collected from http://www.adobe.com; 4) records with transcoding tables for code pages in use must exist in $$$CHARSET table (only for DBMS LINTER version 6.0 or later).

 DBMS LINTER version 6.0 or later includes transcoding tables for code pages 866, KOI8-R, 1251, 437,

850, 1252, ISO 8859-1, ISO 8859-2, ISO 8859-3, ISO 8859-4, ISO 8859-5, ISO 8859-6, ISO 8859-7, ISO 8859-8, ISO 8859-9, ISO 8859-10, ISO 8859-13, ISO 8859-14, ISO 8859-15.

Full Text Search

5

Filters Fast document retrieval in a phrase search system is possible only when the words in the document are indexed. Before indexing, texts should be adjusted to a certain standard. E.g., the following text fragments must be identical from the point of view of the search query: DBMS LINTER DBMS LINTER

Since documents in various formats (TXT, DOC, RTF, PDF, HTML etc.) may be used, it would not be efficient to process all formats using a single phrase search system. A logical solution to this problem is to create a system of converters (or filters) to extract text from data stored in each (other than textual) format. The input of the filter is a stream of data. The output is pure ASCII text. E.g., using an HTML converter, we can extract only the text from an HTML document. A filter in Linter is a dynamic library extracting the content (as a text stream) and the properties (author, size, date created etc.) from a document. The required filters are installed during DBMS customization or by using special SQL operators. Linter has a set of embedded filters for the most common file formats. The filters are attachable modules (libraries). Therefore, any database user can create his own filter for a specific file format, and embed it in the DBMS. The filters in Table 1, called internal filters, are embedded in the Linter kernel. Table 1. Internal Filters of DBMS LINTER Filter Name

Input File Format

ASCTEXT2TEXT

Text in ASCII encoding

ANSI2TEXT

Text in ANSI encoding

KOI8R2TEXT

Text in KOI8-R encoding

UNITEXT2TEXT

Text in UNICODE encoding

UTF82TEXT

Text in UTF8 encoding

RUSTEXT2TEXT

Text in either ASCII, ANSI or KOI8-R encoding

ASCXML2TEXT

HTML, XML in ASCII encoding

UNIXML2TEXT

HTML, XML in UNICODE encoding

DOCRTF2TEXT

RTF, PDF, DOC, XLS, PPT, DOCX, XLSX, PPTX, ODT, ODS, ODP, SXW, SXC, SXI 1)

NOTEXT2TEXT

Any format. The document is excluded from the indexing process.

1)

docx

6

– format

MS Word 2007

Full Text Search

Filters xlsx

– format

MS Excel 2007

pptx

– format

MS PowerPoint 2007

odt

– format

OpenOffice.org Writer 3.x

ods

– format

OpenOffice.org Calc 3.x

odp

– format

OpenOffice.org Impress 3.x

sxw

– format

OpenOffice.org Writer 1.x

sxc

– format

OpenOffice.org Calc 1.x

sxi

– format

OpenOffice.org Impress 1.x

Filters in version 6.0 or later return text in UNICODE encoding; filters in rpior versions return text in CP866 encoding

 The information about all filters available (internal, as well as attached by the user) is stored in the $$$FILTER system table that has the following structure:

CREATE TABLE $$$FILTER ( /* filter number */ $$$ID INTEGER, $$$NAME CHAR(LINTER_NAME_LENGTH), /* filter name */ /* external filter control sum */ $$$KEY INTEGER, $$$MODULE CHAR(128), /* lib. Name, for external filters */ $$$DESC CHAR(256) /* comment */ );

As previously mentioned, this table is created by executing the search.sql file.

Filter Management Creating an Internal Filter Function Attaching an internal filter. This set only represents the potential of the system. To make a filter available for use, the information about it must be placed into the $$$FILTER system table. Specification < internal filter creation > : : = C R E AT E I N T E R N A L F I LT E R < filter name > [ D E S C R I P T I O N < description text > ] ; < filter name > : : = i d e n t i f i e r < description > : : = s t r i n g l i t e r a l

Semantic Rules 1) must match the name of an internal filter; see Table 1; 2) the $$$FILTER table does not allow filter duplication, i.e., repeatedly adding the same internal filter is ignored. To modify a filter you must first delete and then create it over again;

Full Text Search

7

Filters 3) The string literal is limited to 256 characters. The value of the string goes in the $$$DESC field of the $$$FILTER table. Basic Rules The filter is available for use immediately upon creation. Examples CREATE INTERNAL FILTER "ASCTEXT2TEXT"; CREATE INTERNAL FILTER ASCXML2TEXT

DESCRIPTION 'version 1.0';

Creating an External Filter Function Attaching a user-developed filter to DBMS LINTER. Specification < external filter creation > : : = C R E AT E [ E X T E R N A L ] F I LT E R < filter name > = < number > M O D U L E < file specification > [ D E S C R I P T I O N < description > ] ; < filter name > : : = i d e n t i f i e r < numberр > : : = i n t e g e r < file specification > : : = s t r i n g l i t e r a l < description > : : = s t r i n g l i t e r a l

Semantic Rules 1) must not match any of predefinite names of internal filters (see Table 1); 2) must be unique among all filter numbers in the $$$FILTER table; 3) the $$$FILTER table does not allow filter duplication, i.e., repeatedly adding an internal filter with the same name (although with a different ) is ignored; 4) The string literal is limited to 256 characters. The value of the string goes in the comment field of the $$$FILTER table. 5) names the filter file (library). Basic Rules The filter is available for use immediately upon creation. Example CREATE FILTER "Annotation"=17 MODULE 'f:\frase\filter\annotation.dll' DESCRIPTION for book annotations';

Deleting a Filter Function Deleting a previously installed internal or external filter. Specification < filter deletion > : : = D R O P F I LT E R < filter name >

8

Full Text Search

Filters < filter name > : : = i d e n t i f i e r

Semantic Rules must exist in the $$$FILTER table. Basic Rules 1) The named filter is deleted from the $$$FILTER system table and is no longer available. 2) Information about an internal filter remains in the database. 3) An external filter file is not deleted physically. Example DROP FILTER "ASCTEXT2TEXT";

Altering an External Filter Function Replaces a file (library) of a previously installed external filter. Specification < filter modification > : : = A LT E R F I LT E R < filter name > M O D U L E < file specification > < filter name > : : = i d e n t i f i e r < file specification > : : = s t r i n g l i t e r a l Semantic Rules > must exist in the $$$FILTER table. Basic Rules 1) For the named filter, the old file name is replaced with the new in the $$$FILTER table and becomes available for using. 2) The old file is not deleted physically. Example ALTER FILTER "Annotation" MODULE 'f:\frase\filter\annotation01.dll';

Column Filters Setting a Column Filter Function Designating a filter for a column in a table. Specification The following element has been added to the column properties specification in the CREATE TABLE function of the SQL language used in Linter: < using filter > : : = D E FA U LT F I LT E R < filter name >

Full Text Search

9

Filters C R E AT E TA B L E < table name > ( … < column name > < type > D E FA U LT F I LT E R < filter name > … ) ;

Semantic Rules > must exist in the $$$FILTER table. Basic Rules The installed filter is used if not blocked by other commands concerning the use of filters. Example CREATE TABLE TEST_BLOB ( Id INTEGER, Name CHAR(18), Document BLOB DEFAULT FILTER ASCXML2TEXT );

 Problems may occur while using filters due to the following reasons: 1. Files can have different encodings. In DBMS LINTER 5.9 or earlier it is assumed that all data is stored in CP866 encoding. Thus, if a document in another encoding (e.g., CP1251) is written into a database text field, the full text search will be ineffective; 2. if viewing of a PDF-document requires entering a non-blank password, the document content is not indexed, and a warning message is shown on the console. 3. not all PDF-documents provide information required for text extraction and further indexing. The content of such documents may not be indexed; 4. PDF-documents that contain hieroglyphs may require additional files with transcoding tables. In case of absence of required files, the hieroglyphical text will be ignored (see s. 3 on p. 4); 5. Files of RTF, XLS for MS Excel 5.0/95 and Excel 97-2002 and DOC of MS Word 6.0/95 formats may require existence of records with transcoding tables in $$$CHARSET system table. Text in an encoding which does not have a record with transcoding table will not be indexed (it is true for LINTER 6.0 and later). In LINTER 5.9, a text delivered in encodings other than 866, 1251 and KOI8-R will be ignored.

 Currently DBMS LINTER does not actually use external filters. Modifying a Column Filter Function Setting a missing filter for a column or replacing a previously set column filter. Specification < filter modification > : : = A LT E R TA B L E < table name > A LT E R C O L U M N < column name > S E T D E FA U LT F I LT E R < filter name > ;

10

Full Text Search

Filters Semantic Rules 1) must exist in the $$$Filter table. Basic Rules The new filter is assigned to the named column by default.

Deleting a Column Filter Function Canceling a filter assigned to a column. Specification < filter cancellation > : : = A LT E R TA B L E < table name > A LT E R C O L U M N < column name >

D R O P D E FA U LT F I LT E R ;

Semantic Rules must refer to the column for which the filter is to be set.

File Filters For EXTFILE columns, the choice of filter can be performed by Linter automatically based on the file extension. For this purpose, the $$$EXTENSION table is used. It has the following structure: CREATE TABLE $$$EXTENSION ( $$$EXT CHAR(LINTER_NAME_LENGTH), /* extension - CASE-SENSITIVE */ /* filter ID by default */ $$$FILTER INTEGER );

The table is created using the search.sql file.

Setting a File Extention Filter Function Setting a filter for a specific file extension. Specification < filter setting > : : = S E T D E FA U LT F I LT E R < filter name > F O R < extension > ; < extension > : : = s t r i n g l i t e r a l

Semantic Rules 1) > must refer to one of the internal or external filters embedded in the database, i.e the filters present in the $$$FILTER table. 2) The string is the name of the file extension.

Full Text Search

11

Filters Basic Rules 1) SET FILTER is automatically used for EXTFILE columns if the use of another filter is not expressly required; 2) The filters which are set for the indicated file extensions when default.sql is run, are listed in Table 2. Table 2. Default Filters for File Extensions File Extension

Filter Name

TXT, txt

rustext2text

DOC, doc, RTF, rtf, PDF, pdf, DOCX, docx, XLSX, xlsx, PPT, ppt, PPTX, pptx, ODT, odt, ODS, ods, ODP, odp, SXW, sxw, SXC, sxc, SXI, sxi

docrtf2text

XML, xml, HTM, htm, HTML, html, PHTML, phtml, SHTML, shtml

ascxml2text

 Selecting a default filter for file extension is case-sensitive. Thus, according to Table 2, the file myfile.Doc will not be associated with a default filter.

Canceling a File Extention Filter Function Canceling a default filter previously set for a specific file extension. Specification < cancel filter setting > : : = C A N C E L D E FA U LT F I LT E R F O R < extension > ; < extension > : : = s t r i n g l i t e r a l

Semantic Rules The specified must exist in the $$$EXTENSION table. Basic Rules The filter is no longer a default filter for files with this extension.

Word Selection Rules Words of document text consist of:

12



characters a - z , A - Z , А - Я , а - п , р - я , Ё , ё , 0 - 9 and character ‘_’ (LINTER 5.9);



alpha-numeric characters (according to UNICODE standards) and character ‘_’ (LINTER 6.0 and later);



characters significant in the middle of a word: ‘@’, ‘-‘, ‘/’, ‘\’, ‘’’. These characters are partial word if surrounded by aforementioned characters (alpha-numeric and a break character). In particular these characters cannot be the first or the last characters of the word.

Full Text Search

Filters Attribute names and values are subject to the rules set by XML specifications. xml2text filter uses the following rules: 

attribute name starts with characters a - z , A - Z , А - Я , а - п , р - я , Ё , ё , ‘_’, ‘:’;



attribute name continues with characters a - z , A - Z , А - Я , а - п , р - я , Ё , ё , 0 - 9 , ‘_’, ‘:’, ‘.’, ‘-‘;



the default encoding is CP866;



if the document contains CONTENT attribute, the document encoding is defined by the value of charset=… substring inside the CONTENT attribute value.

unixml2text filter uses the following rules: 

attribute name starts with alpha-numeric characters (according to UNICODE standards) and characters ‘_’, ‘:’;



attribute name continues with alpha-numeric characters and also ‘_’, ‘:’, ‘.’, ‘-‘.

An attribute value is a string enclosed in single or double quotes considering the following replacements: Sequence

Character

"

‘”’

&

‘&’

<

‘’

 

‘‘

The maximum length of a word, name or attribute value is 64 letters. Long words are truncated to 64 letters.

Full Text Search

13

Indexing All search engines use previously formed indices for data retrieval. Thus, all documents must be indexed prior to searching. Systems that do not use indexing (i.e., that perform searches by scanning the entire text) cannot be utilized for real-time data retrieval involving dozens or hundreds of megabytes of text. The following methods can be used for indexing: 1) Key word indexing: index entries on each word in a phrase, excluding stop-words (prepositions, conjunctions and other frequently occurring syntactic words). E.g., in the phrase “War and Peace”, two words (“war” and “peace”) will be included in the index. Word order is irrelevant in the process of searching, as every word is retrieved separately, and then the search results intersect. 2) Phrase indexing: the content of a field or sub-field is entered into the index as a single whole. Thus, the phrase “war and peace” will constitute one index entry. In the process of retrieval, words must be entered in the correct order; 3) Key indexing: each word is truncated to equal a specific number of letters; 4) Permutation indexing: the word order in a phrase is changed, so that any word in the phrase can stand at the beginning. DBMS LINTER uses a combination of the first two indexing methods.

 The list of stop-words is currently empty. Creating a Phrase Index Function Creating a phrase index. Specification < create phrase index > : : =

C R E AT E [ O R R E P L A C E ] P H R A S E [ I M M E D I AT E | D E F E R R E D ] [ X M L ] I N D E X < column name > O N < table name > ;

Semantic Rules 1) must belong to a column without a phrase index; 2) valid type: CHAR, VARCHAR, NCHAR, NCHAR VARYING, BLOB, EXTFILE; 3) For BLOB columns, only the DEFERRED modifier is permitted; 4) The XML flag sets the arrangement of an attribute index; 5) The default values of flags and modifiers are listed in Table 3. Table 3. Default Values of Flags and Modifiers Column Type

14

XML Flag

Modifier

CHAR

Cleared

IMMEDIATE

VARCHAR

Cleared

IMMEDIATE

NCHAR

Cleared

IMMEDIATE

NCHAR

Cleared

IMMEDIATE

Full Text Search

Indexing Column Type

XML Flag

Modifier

VARYING BLOB

Cleared

DEFERRED

EXTFILE

Cleared

DEFERRED

Basic Rules 1) Creates a phrase index which includes the content of column; 2) IMMEDIATE denotes instant index updating in case a field is rebuilt. DEFERRED denotes index updating only on the command REBUILD PHRASE INDEX. 3) A phrase index can be created only if the full text search sub-system is provided with a memory buffer at the start of the LINTER kernel. The buffer size is set in pages of size 4K with the /ppool key of DBMS LINTER’s setup string. The minimum size is 4. The /PPOOL=0 key is used by default, i.e the index creation (alteration) is impossible.

 The indexed documents have classification marks. All functions related to full text index or based on text extraction, as well as functions operating with EXTFILE-type fields, process access marks.

Filter Selection Rules The following rules determine the choice of a filter used in creating an index (filters are listed in order of preference): 1)

For BLOB columns:

a filter whose $$$ID field value in the $$$FILTER table equals the BLOB data type number (if other than 0) is selected;  a default filter for the column;  DOCRTF2TEXT, ASCXML2TEXT or UNIXML2TEXT, if the file signature of doc, xls, ppt, rtf, pdf, ps, xml formats is found;  UNITEXT2TEXT in case BOM (Byte Order Mark) exists at the beginning of the document (byte sequence is ffh feh or feh ffh);  ASCTEXT2TEXT. 2) For EXTFILE columns: 

a filter which is set as the second (non-obligatory) parameter of the EXTFILE function; a default filter for the column; a default filter for the file extension (case-sensitive); DOCRTF2TEXT, ASCXML2TEXT or UNIXML2TEXT, if the file signature of doc, xls, ppt, rtf, pdf, ps, xml formats is found;  UNITEXT2TEXT in case BOM (Byte Order Mark) exists in the beginning of the document (byte sequence is ffh feh or feh ffh);  ASCTEXT2TEXT; 3) For NCHAR, NCHAR VARYING columns:    

a default filter for the column; UNITEXT2TEXT; 4) For CHAR and VARCHAR columns:   

a default filter for the column;

Full Text Search

15

Indexing An unformatted text filter in the column encoding (always ASCTEXT2TEXT for versions earlier than Linter 6.0); The ASCXML2TEXT and UNIXML2TEXT filters are used for files in XML, XHTML, and HTML formats. Nevertheless, files of these formats are processed in significntly different ways: in the case of XML, the = couples, which can be included in the index, are extracted if the XML flag is set in the CREATE PHRASE INDEX structure. 

In the case of HTML and XHTML the attribute elements are ignored. The exceptions are the META elements, which contain metainformation about the document. A META element contains 2 necessary parts: NAME=Name1 (or http-equiv) and CONTENT=Value1. If Name1 is equal to "Author", "Keywords" or "Description", the = couples are added into the attribute index. If ="Content-Type", then is scanned for information about the encoding used by the document which is set as "charset=encoding name". The file format is determined by the presence of "

Suggest Documents