/usr/share/perl5/Biblio/Isis/Manual.pod is in libbiblio-isis-perl 0.24-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 | =pod
=head1 NAME
CDS/ISIS manual appendix F, G and H
=head1 DESCRIPTION
This is partial scan of CDS/ISIS manual (appendix F, G and H, pages
257-272) which is than converted to text using OCR and proofread.
However, there might be mistakes, and any corrections sent to
C<dpavlin@rot13.org> will be greatly appreciated.
This digital version is made because current version available in ditial
form doesn't contain details about CDS/ISIS file format and was essential
in making L<Biblio::Isis> module.
This extract of manual has been produced in compliance with section (d) of
WinIsis LICENCE for receiving institution/person which say:
The receiving institution/person may:
(d) Print/reproduce the CDS/ISIS manuals or portions thereof,
provided that such copies reproduce the copyright notice;
=head1 CDS/ISIS Files
This section describes the various files of the CDS/ISIS system, the
file naming conventions and the file extensions used for each type of
file. All CDS/ISIS files have standard names as follows:
nnnnnn.eee
where:
=over 10
=item C<nnnnnn>
is the file name (all file names, except program names, are limited to
a maximum of 6 characters)
=item C<.eee>
is the file extension identifying a particular type of file.
=back
Files marked with C<*> are ASCII files which you may display or print. The
other files are binary files.
=head2 A. System files
System files are common to all CDS/ISIS users and include the various
executable programs as well as system menus, worksheets and message
files provided by Unesco as well as additional ones which you may
create.
=head3 CDS/ISIS Program
The name of the program file, as supplied by Unesco is
ISIS.EXE
Depending on the release and/or target computer, there may also be one
or more overlay files. These, if present, have the extension C<OVL>.
Check the contents of your system diskettes or tape to see whether
overlay files are present.
=head3 System menus and worksheets
All system menus and worksheets have the file extension FMT and the
names are built as follows:
pctnnn.FMT
where:
=over 10
=item C<p>
is the page number (A for the first page, B for the second, etc.)
=item C<c>
is the language code (e.g. E for English), which must be one of those
provided for in the language selection menu xXLNG.
=item C<t>
is X for menus and Y for system worksheets
=item C<nnn>
is a unique identifier
=back
For example the full name of the English version of the menu xXGEN is
C<AEXGEN.FMT>.
The page number is transparent to the CDS/ISIS user. Like the file
extension the page number is automatically provided by the system.
Therefore when a CDS/ISIS program prompts you to enter a menu or
worksheet name you must not include the page number. Furthermore as
file names are restricted to 6 characters, menus and worksheets names
may not be longer than 5 characters.
System menus and worksheets may only have one page.
The language code is mandatory for system menus and standard system
worksheets. For example if you want to link a HELP menu to the system
menu EXGEN, its name must begin with the letter E.
The B<X> convention is only enforced for standard system menus. It is a
good practice, however, to use the same convention for menus that you
create, and to avoid creating worksheets (including data entry
worksheets) with X in this position, that is with names like xB<X>xxx.
Furthermore, if a data base name contains B<X> or B<Y> in the second
position, then the corresponding data entry worksheets will be created
in the system worksheet directory (parameter 2 of C<SYSPAR.PAR>) rather
then the data base directory. Although this will not prevent normal
operation of the data base, it is not recommended.
=head3 System messages files
System messages and prompts are stored in standard CDS/ISIS data bases.
All corresponding data base files (see below) are required when
updating a message file, but only the Master file is used to display
messages.
There must be a message data base for each language supported through
the language selection menu xXLNG.
The data base name assigned to message data bases is xMSG (where x is
the language code).
=head3 System tables
System tables are used by CDS/ISIS to define character sets. Two are
required at present:
=over
=item C<ISISUC.TAB>*
defines lower to upper-case translation
=item C<ISISAC.TAB>*
defines the alphabetic characters.
=back
=head3 System print and work files
Certain CDS/ISIS print functions do not send the output directly to the
printer but store it on a disk file from which you may then print it at
a convenient time. These files have all the file extension C<LST> and
are reused each time the corresponding function is executed.
In addition CDS/ISIS creates temporary work files which are normally
automatically discarded at the end of the session. If the session
terminates abnormally, however, they will not be deleted. A case of
abnormal termination would be a power failure while you are using a
CDS/ISIS program. Also these files, however, are reused each time,
so that you do not normally need to delete them manually. Work files
all have the extension C<TMP>.
The print and work files created by CDS/ISIS are given below:
=over
=item C<IFLIST.LST>*
Inverted file listing file (produced by ISISINV)
=item C<WSLIST.LST>*
Worksheet/menu listing file (produced by ISISUTL)
=item C<xMSG.LST>*
System messages listing file (produced by ISISUTL)
=item C<x.LST>*
Printed output (produced by ISISPRT when printing no print file name is
supplied)
=item C<SORTIO.TMP>
Sort work file 1
=item C<SORTII.TMP>
Sort work file 2
=item C<SORTI2.TMP>
Sort work file 3
=item C<SORTI3.TMP>
Sort work file 4
=item C<SORT20.TMP>
Sort work file 5
=item C<SORT2I.TMP>
Sort work file 6
=item C<SORT22.TMP>
Sort work file 7
=item C<SORT23.TMP>
Sort work file 8
=item C<TRACE.TMP>*
Trace file created by certain programs
=item C<ATSF.TMP>
Temporary storage for hit lists created during retrieval
=item C<ATSQ.TMP>
Temporary storage for search expressions
=back
=head2 B. Data Base files
=over
=item 1
mandatory files, which must always be present.
These are normally established when the data base is defined by means of the
ISISDEF services and should never be deleted;
=item 2
auxiliary files created by the system whenever certain functions are
performed.
These can periodically be deleted when they are no longer needed.
=item 3
user files created by the data base user (such as display formats),
which are fully under the user's responsibility.
=back
Each data base consists of a number of physically distinct files as
indicated below. There are three categories of data base files:
In the following description C<xxxxxx> is the 1-6 character data base
name.
=head3 Mandatory data base files
=over
=item C<xxxxxx.FDT>*
Field Definition Table
=item C<xxxxxx.FST>*
Field Select Table for Inverted file
=item C<xxxxxx.FMT>*
Default data entry worksheet (where p is the page number).
Note that the data base name is truncated to 5 characters if necessary
=item C<xxxxxx.PFT>*
Default display format
=item C<xxxxxx.MST>
Master file
=item C<xxxxxx.XRF>
Crossreference file (Master file index)
=item C<xxxxxx.CNT>
B*tree (search term dictionary) control file
=item C<xxxxxx.N01>
B*tree Nodes (for terms up to 10 characters long)
=item C<xxxxxx.L01>
B*tree Leafs (for terms up to 10 characters long)
=item C<xxxxxx.N02>
B*tree Nodes (for terms longer than 10 characters)
=item C<xxxxxx.L02>
B*tree Leafs (for terms longer than 10 characters)
=item C<xxxxxx.IFP>
Inverted file postings
=item C<xxxxxx.ANY>*
ANY file
=back
=head3 Auxiliary files
=over
=item C<xxxxx.STW>*
Stopword file used during inverted file generation
=item C<xxxxxx.LN1>*
Unsorted Link file (short terms)
=item C<xxxxxx.LN2>*
Unsorted Link file (long terms)
=item C<xxxxxx.LKl>*
Sorted Link file (short terms)
=item C<xxxxxx.LK2>*
Sorted Link file (long terms)
=item C<xxxxxx.BKP>
Master file backup
=item C<xxxxxx.XHF>
Hit file index
=item C<xxxxxx.HIT>
Hit file
=item C<xxxxxx.SRT>*
Sort convertion table (see "Uppercase conversion table (1SISUC.TAB)" on
page 227)
=back
=head3 User files
=over
=item C<yyyyyy.FST>*
Field Select tables used for sorting
=item C<yyyyyy.PFT>*
Additional display formats
=item C<yyyyyy.FMT>*
Additional data entry worksheets
=item C<yyyyyy.STW>*
Additional stopword files
=item C<yyyyyy.SAV>
Save files created during retrieval
=back
The name of user files is fully under user control. However, in order
to avoid possible name conflicts it is advisable to establish some
standard conventions to be followed by all CDS/ISIS users at a given
site, such as for example to define C<yyyyyy> as follows:
xxxyyy
where:
=over
=item C<xxx>
is a data base identifier (which could be the first three letters of
the data base name if no two data bases names are allowed to begin with
the same three letters)
=item C<yyy>
a user chosen name.
=back
=head1 Master file structure and record format
=head2 A. Master file record format
The Master record is a variable length record consisting of three
sections: a fixed length leader; a directory; and the variable length
data fields.
=head3 Leader format
The leader consists of the following 7 integers (fields marked with *
are 31-bit signed integers):
=over
=item C<MFN>*
Master file number
=item C<MFRL>
Record length (always an even number)
=item C<MFBWB>*
Backward pointer - Block number
=item C<MFBWP>
Backward pointer - Offset
=item C<BASE>
Offset to variable fields (this is the combined length of the Leader
and Directory part of the record, in bytes)
=item C<NVF>
Number of fields in the record (i.e. number of directory entries)
=item C<STATUS>
Logical deletion indicator (0=record active; 1=record marked for
deletion)
=back
C<MFBWB> and C<MFBWP> are initially set to 0 when the record is
created. They are subsequently updated each time the record itself is
updated (see below).
=head3 Directory format
The directory is a table indicating the record contents. There is one
directory entry for each field present in, the record (i.e. the
directory has exactly NVF entries). Each directory entry consists of 3
integers:
=over
=item C<TAG>
Field Tag
=item C<POS>
Offset to first character position of field in the variable field
section (the first field has C<POS=0>)
=item C<LEN>
Field length in bytes
=back
The total directory length in bytes is therefore C<6*NVF>; the C<BASE> field
in the leader is always: C<18+6*NVF>.
=head3 Variable fields
This section contains the data fields (in the order indicated by the
directory). Data fields are placed one after the other, with no
separating characters.
=head2 B. Control record
The first record in the Master file is a control record which the
system maintains automatically. This is never accessible to the ISIS
user. Its contents are as follows (fields marked with C<*> are 31-bit
signed integers):
=over
=item C<CTLMFN>*
always 0
=item C<NXTMFN>*
MFN to be assigned to the next record created in the data base
=item C<NXTMFB>*
Last block number allocated to the Master file (first block is 1)
=item C<NXTMFP>
Offset to next available position in last block
=item C<MFTYPE>
always 0 for user data base file (1 for system message files)
=back
(the last four fields are used for statistics during backup/restore).
=head2 C. Master file block format
The Master file records are stored consecutively, one after the other,
each record occupying exactly C<MFRL> bytes. The file is stored as
physical blocks of 512 bytes. A record may begin at any word boundary
between 0-498 (no record begins between 500-510) and may span over two
or more blocks.
As the Master file is created and/or updated, the system maintains an
index indicating the position of each record. The index is stored in
the Crossreference file (C<.XRF>)
=head2 D. Crossreference file
The C<XRF> file is organized as a table of pointers to the Master file.
The first pointer corresponds to MFN 1, the second to MFN 2, etc.
Each pointer consists of two fields:
=over
=item C<RECCNT>*
=item C<MFCXX1>*
=item C<MFCXX2>*
=item C<MFCXX3>*
=item C<XRFMFB>
(21 bits) Block number of Master file block containing the record
=item C<XRFMFP>
(11 bits) Offset in block of first character position of Master record
(first block position is 0)
=back
which are stored in a 31-bit signed integer (4 bytes) as follows:
pointer = XRFMFB * 2048 + XRFMFP
(giving therefore a maximum Master file size of 500 Megabytes).
Each block of the C<XRF> file is 512 bytes and contains 127 pointers. The
first field in each block (C<XRFPOS>) is a 31-bit signed integer whose
absolute value is the C<XRF> block number. A negative C<XRFPOS> indicates
the last block.
I<Deleted> records are indicated as follows:
=over
=item C<XRFMFB E<lt> 0> and C<XRFMFP E<gt> 0>
logically deleted record (in this case C<ABS(XRFMFB)> is the correct block
pointer and C<XRFMFP> is the offset of the record, which can therefore
still be retrieved)
=item C<XRFMFB = -1> and C<XRFMFP = 0>
physically deleted record
=item C<XRFMFB = 0> and C<XRFMFP = 0>
inexistent record (all records beyond the highest C<MFN> assigned in the
data base)
=back
=head2 E. Master file updating technique
=head3 Creation of new records
New records are always added at the end of the Master file, at the
position indicated by the fields C<NXTMFB>/C<NXTMFP> in the Master file
control record. The C<MFN> to be assigned is also obtained from the field
C<NXTMFN> in the control record.
After adding the record, C<NXTMFN> is increased by 1 and C<NXTMFB>/C<NXTMFP>
are updated to point to the next available position. In addition a new
pointer is created in the C<XRF> file and the C<XRFMFP> field corresponding
to the record is increased by 1024 to indicate that this is a new
record to be inverted (after the inversion of the record 1024 is
subtracted from C<XRFMFP>).
=head3 Update of existing records
Whenever you update a record (i.e., you call it in data entry and exit
with option X from the editor) the system writes the record back to the
Master file. Where it is written depends on the status of the record
when it was initially read.
=head4 There was no inverted file update pending for the record
This condition is indicated by the following:
On C<XRF> C<XRFMFP E<lt> 512> and
On C<MST> C<MFBWB = 0> and C<MFBWP = 0>
In this case, the record is always rewritten at the end of the Master
file (as if it were a new record) as indicated by C<NXTMFB>/C<NXTMFP> in the
control record. In the new version of the record C<MFBWB>/C<MFBWP> are set to
point to the old version of the record, while in the C<XRF> file the
pointer points to the new version. In addition 512 is added to C<XRFMFP>
to indicate that an inverted file update is pending. When the inverted
file is updated, the old version of the record is used to determine the
postings to be deleted and the new version is used to add the new
postings. After the update of the Inverted file, 512 is subtracted from
C<XRFMFP>, and C<MFBWB>/C<MFBWP> are reset to 0.
=head4 An inverted file update was pending
This condition is indicated by the following:
On C<XRF> C<XRFMFP E<gt> 512> and
On C<MST> C<MFBWB E<gt> 0>
In this case C<MFBWB>/C<MFBWP> point to the version of the record which is
currently reflected in the Inverted file. If possible, i.e. if the
record length was not increased, the record is written back at its
original location, otherwise it is written at the end of the file. In
both cases, C<MFBWB>/C<MFBWP> are not changed.
=head3 Deletion of records
Record deletion is treated as an update, with the following additional
markings:
On C<XRF> C<XRFMFB> is negative
On C<MST> C<STATUS> is set to 1
=head2 F. Master file reorganization
As indicated above, as Master file records are updated the C<MST> file
grows in size and there will be lost space in the file which cannot be
used. The reorganization facilities allow this space to be reclaimed by
recompacting the file.
During the backup phase a Master file backup file is created (C<.BKP>).
The structure and format of this file is the same as the Master file
(C<.MST>), except that a Crossreference file is not required as all the
records are adjacent. Records marked for deletion are not backed up.
Because only the latest copy of each record is backed up, the system
does not allow you to perform a backup whenever an Inverted file update
is pending for one or more records.
During the restore phase the backup file is read sequentially and the
program recreates the C<MST> and C<XRF> file. At this point alt records which
were marked for logical deletion (before the backup) are now marked as
physically deleted (by setting C<XRFMFB = -1> and C<XRFMFP = 0>.
Deleted records are detected by checking holes in the C<MFN> numbering.
=head1 Inverted file structure and record formats
=head2 A. Introduction
The CDS/ISIS Inverted file consists of six physical files, five of
which contain the dictionary of searchable terms (organized as a
B*tree) and the sixth contains the list of postings associated with
each term. In order to optimize disk storage, two separate B*trees are
maintained, one for terms of up to 10 characters (stored in files
C<.N01>/C<.L01>) and one for terms longer than 10 characters, up to a maximum
of 30 characters (stored in files C<.N02>/C<.L02>). The file C<CNT> contains
control fields for both B*trees. In each B*tree the file C<.N0x> contains
the nodes of the tree and the C<.L0x> file contains the leafs. The leaf
records point to the postings file C<.IFP>.
The relationship between the various files is schematically represented
in Figure 67.
The physical relationship between these six files is a
pointer, which represents the relative address of the record being
pointed to. A relative address is the ordinal record number of a record
in a given file (i.e. the first record is record number 1, the second
is record number 2, etc.). The file C<.CNT> points to the file C<.N0x>,
C<.N0x> points to C<.L0x>, and C<.L0x> points to C<.IFP>. Because the
C<.IFP> is a packed file, the pointer from C<.L0x> to C<.IFP> has two
components: the block number and the offset within the block, each expressed
as an integer.
=head2 B. Format of C<.CNT> file
This file contain two 26-byte fixed length records (one for each
B*tree) each containing 10 integers as follows (fields marked with *
are 31-bit signed integers):
=over
=item C<IDTYPE>
B*tree type (1 for C<.N01>/C<.L01>, 2 for C<.N02>/C<.L02>)
=item C<ORDN>
Nodes order (each C<.N0x> record contains at most C<2*ORDN> keys)
=item C<ORDF>
Leafs order (each C<.L0x> record contains at most C<2*ORDF> keys)
=item C<N>
Number of memory buffers allocated for nodes
=item C<K>
Number of buffers allocated to lst level index (C<K E<lt> N>)
=item C<LIV>
Current number of index levels
=item C<POSRX>*
Pointer to Root record in C<.N0x>
=item C<NMAXPOS>*
Next available position in C<.N0x> file
=item C<FMAXPOS>*
Next available position in C<.L0x> file
=item C<ABNORMAL>
Formal B*tree normality indicator (0 if B*tree is abnormal, 1 if B*tree
is normal). A B*tree is abnormal if the nodes file C<.N0x> contains only
the Root.
=back
C<ORDN>, C<ORDF>, C<N> and C<K> are fixed for a given generated system.
Currently these values are set as follows:
C<ORDN = 5>; C<ORDF = 5>; C<N = 15>; C<K = 5> for both B*trees
+--------------+
| Root address |
+-------|------+
| .CNT file
| -------------
| .N0x file
+-----------V--------+
| Key1 Key2 ... Keyn | Root
+---|-------------|--+
| |
+-----+ +------+
| |
+----------V----------+ +---------V----------+ 1st level
| Key1 Key2 ... Keyn | ... | Key1 Key2 ... Keyn | index
+--|------------------+ +-----------------|--+
| :
: +-------+
| |
+--V------------------+ +---------V----------+ last level
| Key1 Key2 ... Keyn | ... | Key1 Key2 ... Keyn | index
+---------|-----------+ +---------|----------+
| |
| | -------------
| | .L0x file
+---------V-----------+ +---------V----------+
| Key1 Key2 ... Keyn | ... | Key1 Key2 ... Keyn |
+--|------------------+ +--------------------+
|
| -------------
| .IPF file
+--V----------------------------------+
| P1 P2 P3 ..................... Pn |
+-------------------------------------+
I<Figure 67: Inverted file structure>
The other values are set as required when the B*trees are generated.
=head2 C. Format of C<.N0x> files
These files contain the indexes) of the dictionary of searchable terms
(C<.N01> for terms shorter than 11 characters and C<.N02> for terms longer
than 10 characters). The C<.N0x> file records have the following format
(fields marked with * are 31-bit signed integers):
=over
=item C<POS>*
an integer indicating the relative record number (1 for the first
record, 2 for the second record, etc.)
=item C<OCK>
an integer indicating the number of active keys in the record
( C<1 E<lt>= OCK E<lt>= 2*ORDN> )
=item C<IT>
an integer indicating the type of B*tree (1 for C<.N01>, 2 for C<.N02>)
=item C<IDX>
an array of C<ORDN> entries (C<OCK> of which are active), each having the
following format:
=over 4
=item C<KEY>
a fixed length character string of length C<.LEx> (C<LE1 =10>, C<LE2 = 30>)
=item C<PUNT>
a pointer to the C<.N0x> record (if C<PUNT E<gt> 0>) or C<.L0x> record
(if C<PUNT E<lt> 0>) whose C<IDX(1).KEY = KEY>. C<PUNT = 0> indicates
an inactive entry. A positive C<PUNT> indicates a branch to a hierarchically
lower level index. The lowest level index (C<PUNT E<lt> 0>) points the leafs in
the C<.L0x> file.
=back
=back
=head2 D. Format of C<.L0x> files
These files contain the full dictionary of searchable terms (C<.L01> for
terms shorter than 11 characters and C<.L02> for terms longer than 10
characters). The C<.L0x> file records have the following format (fields
marked with C<*> are 31-bit signed integers):
=over
=item C<POS>*
an integer indicating the relative record number (1 for the first
record, 2 for the second record, etc.)
=item C<OCK>
an integer indicating the number of active keys in the record
(C<1 E<lt> OCK E<lt>= 2*ORDF>)
=item C<IT>
an integer indicating the type of B*tree (1 for C<.N01>, 2 for C<.N02>)
=item C<PS>*
is the immediate successor of C<IDX[OCK].KEY> in this record (this is used
to speed up sequential access to the file)
=item C<IDX>
an array of C<ORDN> entries (C<OCK> of which are active), each having the
following format:
=over 4
=item C<KEY>
a fixed length character string of length C<LEx> (C<LE1=10>, C<LE2=30>)
=item C<INFO>
a pointer to the C<.IFP> record where the list of postings associated with
C<KEY> begins. This pointer consists of two 31-bit signed integers as
follows:
=over 8
=item C<INFO[1]>*
relative block number in C<.IFP>
=item C<INFO[2]>*
offset (word number relative to 0) to postings list
=back
=back
=back
=head2 E. Format of C<.IFP> file
This file contains the list of postings for each dictionary term. Each
list of postings has the format indicated below. The file is structured
in blocks of 512 characters, where (for an initially loaded and
compacted file) the lists of postings for each term are adjacent,
except as noted below.
The general format of each block is:
=over
=item C<IFPBLK>
a 31-bit signed integer indicating the Block number of this block
(blocks are numbered from 1)
=item C<IFPREC>
An array of 127 31-bit signed integers
=back
C<IFPREC[1]> and C<FPREC[2]> of the first block are a pointer to the
next available position in the C<.IFP> file.
Pointers from C<.L0x> to C<.IFP> and pointers within C<.IFP> consist of two
31-bit signed integers: the first integer is a block number, and the
second integer is a word offset in C<IFPREC> (e.g. the offset to the
first word in C<IFPREC> is 0). The list of postings associated with the
first search term will therefore start at 1/0.
Each list of postings consists of a header (5 double-words) followed by
the actual list of postings (8 bytes for each posting). The header has
the following format (each field is a 31-bit signed integer):
=over
=item C<IFPNXTB>*
Pointer to next segment (Block number)
=item C<IFPNXTP>*
Pointer to next segment (offset)
=item C<IFPTOTP>*
Total number of postings (accurate only in first segment)
=item C<IFPSEGP>*
Number of postings in this segment (C<IFPSEGP E<lt>= IFPTOTP>)
=item C<IFPSEGC>*
Segment capacity (i.e. number of postings which can be stored in this
segment)
=back
Each posting is a 64-bit string partitioned as follows:
=over
=item C<PMFN>
(24 bits) Master file number
=item C<PTAG>
(16 bits) Field identifier (assigned from the C<FST>)
=item C<POCC>
(8 bits) Occurrence number
=item C<PCNT>
(16 bits) Term sequence number in field
=back
Each field is stored in a strict left-to-right sequence with leading
zeros added if necessary to adjust the corresponding bit string to the
right (this allows comparisons of two postings as character strings).
The list of postings is stored in ascending C<PMFN>/C<PTAG>/C<POCC>/C<PCNT>
sequence. When the inverted file is loaded sequentially (e.g. after a
full inverted file generation with ISISINV), each list consists of one
or more adjacent segments. If C<IFPTOT E<lt>= 32768> then:
C<IFPNXTB/IFPNXTP = 0/0> and C<IFPTOT = IFPSEGP = IFPSEGC>.
As updates are performed, additional segments may be created whenever
new postings must be added. In this case a new segment with capacity
C<IFPTOTP> is created and linked to other segments (through the pointer
C<IFPNXTB>/C<IFPNXTP>) in such a way that the sequence
C<PMFN>/C<PTAG>/C<POCC>/C<PCNT> is maintained. Whenever such a split occurs
the postings of the segment where the new posting should have been inserted
are equally distributed between this segment and the newly created segment.
New segments are always written at the end of the file (which is maintained
in C<IFPREC[1]>/C<IFPREC[2]> of the first C<.IFP> block.
For example, assume that a new posting C<Px> has to be inserted between C<P2>
and C<P3> in the following list:
+----------------------------+
| 0 0 5 5 5 | P1 P2 P3 P4 P5 |
+----------------------------+
after the split (and assuming that the next available position in C<.IFP>
is 3/4) the list of postings will consist of the following two segments:
+----------------------------+
| 3 4 5 3 5 | P2 P2 Px -- -- |
+--|-------------------------+
|
+--V-------------------------+
| 0 0 5 3 5 | P3 P4 P5 -- -- |
+----------------------------+
In this situation, no new segment will be created until either segment
becomes again full.
As mentioned above, the posting lists are normally stored one after the
other. However, in order to facilitate access to the C<.IFP> file the
segments are stored in such a way that:
=over
=item 1
the header and the first posting in each list (28 bytes) are never
split between two blocks.
=item 2
a posting is never split between two blocks; if there is not enough
room in the current block the whole posting is stored in the next
block.
=back
=head1 LICENCE
UNESCO has developed and owns the intellectual property of the CDS/ISIS
software (in whole or in part, including all files and documentation, from
here on referred to as CDS/ISIS) for the storage and retrieval of
information.
For complete text of licence visit
L<http://www.unesco.org/isis/files/winisislicense.html>.
=cut
|