Sunday, May 30, 2010

Adding document information (metadata) and date filtering to your searches


Acrobat doesn’t automatically include document information (otherwise known as metadata) as part of the search. Nor does it include an equally powerful search feature called date filtering (which enables you to match documents in a collection that were created or modified within a range of dates). As described previously, you get these options only if you choose to refine your Basic Search or choose to have these Advanced options displayed by default in the Search PDF pane when you initiate a search. As you can see, you can now search for the metadata that you so assiduously entered for each PDF document in the collection (at my gentle insistence), as well as the aforementioned date filtering technique, all in the same search. To add metadata and date filtering to your search criteria, follow these steps:
  1. From the drop-down list on the left under Use These Additional Criteria, select the metadata criteria (Title, Subject, Author, and Keywords) you wish to search for. In addition to Document Properties information (metadata), you can also choose Filename, Bookmarks, Comments, JPEG Images, and XMP Metadata (a format that makes it easier to share metadata between documents created in different Adobe programs) as search criteria from the Use These Additional Criteria drop-down lists.
  2. From the drop-down list on the right under Use These Additional Criteria, select either Contains or Does Not Contain.
  3. Enter the words or names to search for in text box below the Use These Additional Criteria drop-down lists.
  4. To add date filtering, choose either Date Modified or Date Created from the Use These Additional Criteria drop-down list.
  5. From the drop-down list to the right, select Is Exactly, Is Before, Is After, or Is Not.
  6. Click the drop-down list below the date criteria drop-down lists and select a date on the calendar that appears.
After you click a date, the calendar closes and the date appears in the drop-down list box.
By adding the date filtering fields (Created or Modified After or Before) in the Use These Additional Criteria area, you can also refine a search by the approximate date the particular PDF files in the collection were originally created and/or modified. This makes it possible to find a document that shares essentially the same metadata as others in the collection but was created or last modified on a particular date.

Refining your search


Sometimes, your first search for a particular term results in too many matching files pulled from the PDF document collection, and you find that you need to refine your search further narrow the search results. To do this, follow these steps:
  1. Click the Refine Search Results link near the bottom of the Search PDF pane to display Advanced Search options in the Search PDF pane. Note that when you refine your search in this manner, the options you choose are applied to the previous search results.
  2. Replace or further refine the search term in the Search Within the Previous Results For text box.
  3. Select a new option, if desired, in the Return Results Containing dropdown list, and then select or deselect the Whole Words Only, Case-Sensitive, Proximity, or Stemming check boxes to further refine your search criteria.
  4. Click the Refine Search Results button to begin your new search.
The Advanced Search options that appear in the Use These Additional Criteria section of the Search PDF pane provide a means of using metadata and date filtering as search criteria. These powerful search options are covered in the next section.
By default, Acrobat displays its Basic Search options when you choose Edit➪Search or press Ctrl+F (Ô+F on Mac) to initiate a search. The Advanced Search options are displayed only when you choose Refine Search Results in the Search PDF pane after performing a basic search. To have Acrobat display the Advanced Search options rather than the Basic Search options in the Search PDF pane when you initiate a search, choose Edit➪Preferences or press Ctrl+K (Ô+K on Mac) to open the Preferences dialog box. Click Search in the list box to display the Search options. Select the Always Use Advanced Search Options check box, and then click OK to close the Preferences dialog box. Note that when you choose this option, you won’t have access to the Basic Search options until you turn off this feature by deselecting the check box in the Search section of the Preferences dialog box.

Monday, April 26, 2010

Viewing the search results

When Acrobat finishes doing the search (which it completes very quickly, except in the cases of huge document collections), it displays all matching files and ranks them in order of relevance in the Results list boxRelevance Ranking is the default setting in the Sort By drop-down list. You can change the sort order of the Results list box by selecting Date Modified, Filename, or Location from the Sort By drop-down list. To have Acrobat open a document in the Results list and show you the first occurrence of the search term, click the Expand button (plus sign on Windows, triangle pointing right on Mac) to display a list of occurrences of the search term as they appear in the PDF document. Acrobat creates hyperlinks out of all search terms in the Results list box. If you hover the mouse pointer over a search term, a screen tip appears, indicating the page number that the term appears on in the selected PDF document. Clicking a search term opens the PDF document in the document pane and highlights the occurrence of search term on the page in the selected PDF document. You can close the Search PDF pane, which, like all How To panes, takes up a third of your screen, so that you can more easily view the matches highlighted in the selected document. To redisplay the Search PDF pane, press Ctrl+F (Ô+F on Mac), or you can use the Search Result commands on the Acrobat menu bar. Choose Edit➪Search Results and choose either Next Document, Next Result, Previous Result, or Previous Document on the submenu. The keyboard shortcuts are listed on this submenu.

How to find phrases in PDF document

The steps for finding terms or phrases in a PDF document collection with the Search feature are as follows:
  1. Choose Edit➪Search, or press Ctrl+Shift+F (Ô+Shift+F on the Mac) to open the Search PDF pane. The Search PDF pane opens.
  2. Click the Use Advanced Search Options link at the bottom of the Search PDF pane and from the Look In drop-down list, choose Select Index.
  3. If the index you want to use is not listed in the Available Indexes list box, click the Add button, open the folder with the PDF document collection you want to search, click the index file icon, and then click the Open button. The Select Index dialog box closes, and you return to the Index Selection dialog box.
  4. Select the index you want to use for your search; deselect any index(es) you don’t want to use for your search. After you have selected only the index(es) you want to use in the search, click OK. The Index Selection dialog box closes, and you return to the Search PDF pane.
  5. Enter the search term(s) or phrase in the What Word or Phrase Would You Like to Search For? text box. Remember that you can use wildcard characters for characters of which you’re uncertain in the search term or phrase.
  6. Choose a search criterion (Match Exact Word or Phrase, Match Any of the Words, Match All of the Words, or Boolean Query) in the Return Results Containing drop-down list.
  7. Select any of the search options (Whole Words Only, Case Sensitive, Proximity, Stemming, Search in Bookmarks, and Search in Comments) that you want to apply.
  8. Click the Search button to have Acrobat search the designated index or indexes. The results are displayed in the Search Results dialog box.

Searching a Collection

After you’ve created the indexes you need to search your PDF document collections, you can use the Search feature in Acrobat 6 or Adobe Reader 6 to quickly locate key terms and phrases. Keep in mind that when you use the Search feature, Acrobat is searching for the occurrence of your terms in any of the indexed documents included in the PDF document collection. Therefore, along with specifying the search terms, you need to specify which index should be used in doing the search.
In order to be able to search collections in Adobe Reader 6 (as opposed to Acrobat 6), you must download the Full version of the program from Adobe’s Web site. The Basic version lacks the ability to search PDF files. When specifying the search terms, you can use wildcard characters. Use the asterisk (*) to indicate any number of missing characters and the question mark (?) for single missing characters. You can also use the following Boolean operators:
  • NOT: Excludes documents in the collection that contain a certain word or phrase, such as NOT “Chicago”. You can also use the NOT operator by entering the ! (exclamation point) in front of the term to be excluded.
  • AND: Narrows the search to documents that contain both terms, such as “Chicago” AND “New York”. When you use the AND operator, Acrobat matches a document only when it contains both terms.
  • OR: Expands the search to include documents that include either search term, such as “Chicago” OR “St. Louis”. When you use the OR operator, Acrobat matches any document that contains one or the other term.
When specifying a search term, you can also include any of the following word search options:
  • Whole Words Only: Limits matches to occurrences of the whole words specified in the search words or phrases.
  • Case Sensitive: Limits matches in a search to the words in the document collection that exhibit a strict upper- and lowercase correspondence to the term for which you’re searching.
  • Proximity: Ignores any matches unless one instance of the search term occurs within three pages of another instance of it in the documents included in the PDF document collection. For example, if you search for the phrase customer satisfaction guaranteed, Acrobat will show matches only when this phrase occurs more than once in the document and at least two occurrences are within three pages of each other.
  • Stemming: Enables the Word Assistant preview (that you can use to refine searches — see the “Refining your search” section, later in this chapter) and expands matches in a search to words in the document collection that use the same word stem (so that occurrences of foremost, foreman, and foresee in the collection all match when you specify fore as the search term).
  • Search in Bookmarks: Expands matches in a search to occurrences in the PDF document bookmarks.
  • Search in Comments: Expands matches in a search to occurrences in the PDF document comments

Friday, March 26, 2010

Rebuilding an index

If you modify a PDF document collection for which you’ve created an index by removing or adding files to the collection, you must rebuild the index in order to have Acrobat search its entire contents. Before you rebuild an index for a collection from which you have removed some PDF files, you need to purge the index. When you do this, Acrobat actually removes the files no longer part of the collection from the index, rather than just marking them as invalid. Purging them from the index streamlines it considerably and makes searching it as fast as possible.
To purge and then rebuild an index, follow these steps:

1. Choose Advanced➪Catalog; in the Catalog dialog box that appears, click the Open Index button.
The Open Index File dialog box appears.

2. Select the folder that contains the PDF document collection and the index file, and then click the index file icon (the one with the .pdx file extension in Windows) before you click the Open button.
The Open Index File dialog box closes, and the Index Definition dialog box appears.

3. Click the Purge button at the bottom of the Index Definition dialog box.
Acrobat responds by opening the Catalog dialog box that displays the status of your index purge operation with a progress bar. When the purge operation is finished, you are informed of that fact in the list box below the progress bar.

4. To rebuild the purged index, click the Open Index button again, click the index file icon, and then click the Open button.
Once again, the Open Index File dialog box closes, and the Index Definition dialog box appears.

5. Click the Rebuild button to rebuild the index using only the PDF files left after the purge.

6. After Acrobat finishes rebuilding the index, click the Close button to close the Catalog dialog box.

After you’ve finished purging and rebuilding an index, you can then immediately start using it in the searches you perform on the PDF document collection. Although not specifically noted in the preceding steps, keep in mind that prior to clicking the Rebuild button, you can click the Options button to modify stop words or change the other number and document element search options, as discussed earlier in this chapter in the section, “Building an index for your collection.”
If you use only one particular index that you built when searching a particular PDF document, you can associate the index file with the PDF file. That way, Acrobat automatically mounts the index so you’re ready to search the document with it every time you open the PDF document in Acrobat. To do this, choose File➪Document Properties and click Advanced in the list box to display the Advanced Document Properties options. In the PDF Setting area, click the Browse button to locate and select the index file you want to associate with the current PDF document. Click Open to select the index file and return to the Document Preferences dialog box. The directory path for the index file now appears in the Search Index text box. Click OK to close the Document Preferences dialog box.

Building an index for your collection

After you’ve prepared your document collection, you’re ready to build the index for it. When you create the index, you specify the folder that contains the PDF document collection (this is also the folder in which the index file and its support folder must reside). You also can specify up to a maximum of 500 words that you want excluded from the index (such as a, an, the, and, or, and the like) and have numbers excluded from the index to speed up your searches. Words that you exclude from an index are called stop words. Keep in mind that while specifying stop words does give you a smaller and more efficient index (estimated at between 10 and 15 percent smaller), it also prevents you and other users from searching the collection for phrases that include these stop words (such as “in the matter of Smith and James”).
To build a new index, follow these steps:

1. Launch Acrobat and choose Advanced➪Catalog.
(You don’t have to have any of the files in the PDF document collection open at the time you do this.) The Catalog dialog box opens.

2. Click the New Index button in the Catalog dialog box.
The Index Definition dialog box opens,

3. Enter a descriptive title that clearly and concisely identifies the new index in the Index Title text box.

4. Click in the Index Description list box and enter a complete description of the index.
This description can include the stop words, search options supported, and the kinds of documents indexed.

5. Click the Add button to the right of the Include These Directories list box; in the Browse for Folder dialog box, select the folder that contains your PDF document collection and click OK.

6. To specifically exclude any subfolders that reside within the folder that contains your PDF document collection (the one whose directory path is now listed in the Include These Directories list box), click the Add button to the right of the Exclude These Subdirectories list box, select the subfolders of the folder you selected in Step 5, and click OK.
Repeat this step for any other subfolders that need to be excluded. (Actually, you should be able to skip this step entirely, because the folder that contains your PDF document collection ideally shouldn’t have any other folders in it.)

7. To further configure your index definition, click the Options button.

The Options dialog box opens.

8. Select the Do Not Include Numbers check box to exclude numbers from the index.

9. In the rare event that your PDF document collection contains PDF files saved in the original Acrobat 1.0 file format, select the Add IDs to Acrobat 1.0 PDF Files check box.

10. Select the Do Not Warn for Changed Documents When Searching check box if you don’t want to see an alert dialog box when you search documents that have changed since the last index build.

11. Click the Custom Properties button to open the Custom Properties dialog box, where you specify that any custom fields that have been added to the PDF document be searched. These include any custom fields that were converted by PDFMaker 6.0 from Microsoft Word documents.

12. To specify stop words for the index or to disable any of the word search options, click the Stop Words button. The Stop Words dialog box opens.

13. To specify a stop word that is not included in the index, enter a term in the Word text box and click the Add button.
Repeat this step until you’ve added all the stop words you don’t want indexed.

14. Click OK to close the Stop Words dialog box and return to the Options dialog box.

15. Click the Tags button to specify which document structure tags (if the PDF Document is tagged) can be used as search criteria in the Tags dialog box.

16. Click OK to close the Options dialog box and return to the New Index Definition dialog box.

17. Check over the fields in the New Definition dialog box and, if everything looks okay, click the Build button. The Save Index File dialog box opens.

18. If you want, replace the generic filename index.pdx in the File Name (Name on the Mac) text box with a more descriptive filename, and then click the Save button.

When editing the filename, be sure that you don’t select a new folder in which to save the file (it must be in the same folder as your PDF document collection) and, in Windows, don’t remove the .pdx extension (for Portable Document Index) that identifies it as a special Acrobat index file.
Acrobat responds by displaying the Catalog dialog box that keeps you informed of its progress as it builds the new index. When the Progress bar reaches 100% and the program finishes building the index, you can then click the Close button to close the Catalog dialog box and return to the Acrobat program, where you can start using the index in searching the files in the PDF document collection. Note that when Acrobat builds an index, it not only creates a new index file (with the .pdx filename extension on Windows), but also creates a new support folder using the same filename as the index file. All settings specified in the Options dialog box (Steps 7 through 15 in the preceding step list) apply only to the currently opened index file. If you want to apply any or all of these options globally to every catalog index you create, choose Edit➪Preferences and click Catalog in the list box to display the Catalog Preferences options. You can then specify global settings for index file creation, using the same options found in the Options dialog box.