The following is a draft of the ASN.1 for the Type 102 Ranked List Query, crafted by Ray Denenberg (not yet checked for compile errors or semantic accuracy or integrity): ASN.1 for Ranked List Query RLQ DEFINITIONS ::= BEGIN IMPORTS AttributeSetId, AttributesPlusTerm, ProximityOperator, IntUnit, StringOrNumeric, OtherInformation FROM Z39-50-APDU-1995 HumanString FROM RecordSyntax-explain RestrictSet, RelInfo FROM IdontKnowWhere; RankedQuery ::= SEQUENCE { needList [1] IMPLICIT SEQUENCE OF NeedStatement, -- The actual content of the query, stating -- the information need(s) of the user. combineNeedLists [2] CHOICE { -- Evaluation of each need statement will -- result in a list of docs and RSVs. This -- will take those sets and form the final -- result set. default is server-choice. addWeight [1] IMPLICIT NULL, -- server weighted addition. ext [2] IMPLICIT EXTERNAL} OPTIONAL, attributeSet [3] IMPLICIT AttributeSetId, -- default attribute set for terms. searchOutputRequest [4] IMPLICIT SearchOutputRequest OPTIONAL, -- The information to be accumulated and -- possibly returned by the server for this -- seach request. clientServerInfo [5] IMPLICIT ClientServerInfo OPTIONAL, -- Advice/Info from the client about how this -- query should be reformulated and search to -- be done. serverClientInfo [6] IMPLICIT ServerClientInfo OPTIONAL -- Advice/Info from the server about query. } NeedStatement ::= SEQUENCE { restrictSet [1] RestrictSet OPTIONAL, -- Definition of set of docs on which search is to be -- done (within the databases specified in -- SearchRequest). Howard Turtle will flesh this out. -- Includes at least databases, Boolean restrictions -- (type 101 query), result sets. Also include list -- of docs to exclude because have seen on previous -- feedback iteration. relInfo [2] RelInfo OPTIONAL, -- Relevance information (binary?) for a list of docs. rqquery [3] IMPLICIT OperandPlusWeight OPTIONAL, -- actual query. weight [4] IMPLICIT IntUnit OPTIONAL -- relative importance of this need statement as a 0 -- to 1 scaled number } OperandPlusWeight ::= SEQUENCE { operand [1] CHOICE { attrTerm AttributesPlusTerm, -- base term sOperand [1] StructuredOperand -- recursive definition. }, weight [2] IMPLICIT IntUnit OPTIONAL, -- Relative importance of term, on 0 to 1 scale. -- Default 1. clientServerInfo [3] IMPLICIT ClientServerInfo OPTIONAL, -- Advice/Info from the client about how this -- particular operand reformulated. This -- over-rides the query ClientServerInfo serverClientInfo [4] IMPLICIT ServerClientInfo OPTIONAL -- Advice/Info from the server about this -- particular operand. Allows server to annotate -- the 102 Query structure with additional -- information. Examples would include partial -- RSV's being returned after a search, or -- possibly collection information. } StructuredOperand ::= SEQUENCE { rqOperator [1] IMPLICIT RQOperator, -- gives relationship between operands and information -- about combining them. rqOperandList [2] IMPLICIT SEQUENCE OF OperandPlusWeight, -- ordered list of operands context [3] CHOICE { -- All operands in this subtree must be satisfied -- (have non-zero partial RSV) in the same context. -- unit gives the scope of the context definition, -- and distance gives how far away from each other -- the satisfaction can be. 0 indicates within the -- same unit, 1 indicates in adjacent units, and so -- on. Note that RQContext is a binding operator, with -- some of the properties of a Boolean AND. A context -- of the same word implies that same word must match -- each of the operands of the subtree. prox [1] IMPLICIT ProximityOperator, -- same syntax as in type-101 query, -- but semantics expanded as above. ext [2] IMPLICIT EXTERNAL} OPTIONAL} SearchOutputRequest ::= SEQUENCE { -- Describes output of query. All except returnResultSet -- will be given in AdditionalSearchInfo of SearchResponse. returnResultSet [1] IMPLICIT BOOLEAN, -- True means perform the search -- and establish a result set. returnReformulatedQuery [2] IMPLCIIT BOOLEAN, -- True means return the query that -- actually operated on the docs after -- reform. This will be returned as a -- RQInfo EXTERNAL within -- AdditionalSearchInfo, -- and will have Tagvalue from tagset-RQM mData [3] IMPLICIT SEQUENCE OF SEQUENCE{ tagType [1] IMPLCIT INTEGER OPTIONAL, -- default tagset-RQM tagValue StringOrNumeric -- value (probably from -- tagset-RQM) indicating what sorts -- of metadata should be returned. -- Note that depending on tag, some -- of this metadata may be returned -- within AdditionalSearchInfo of -- SearchResponse, and some within -- a Present of the document using -- record syntax of RQRS -- (RankedRecordSyntax). } OPTIONAL} ClientServerInfo ::= SEQUENCE { reformClause [1] IMPLICIT BOOLEAN, -- allow reformulation this operand/query. If false -- and the server does not support a term or -- attribute, then this part of the search fails. recallImportance [2] IMPLICIT IntUnit OPTIONAL, -- setting between 0 and 1 of how every useful doc -- is. Eg, 1, the server may try to add many -- related terms to the query, at a cost of -- precision. Only used if reformClause is true. reformMethod [3] IMPLICIT EXTERNAL OPTIONAL, -- client/server agreed upon specification of what -- reformulation methods to be done. We will define -- a methodology for this later. Only used if -- reformClause is true. resultSetDesc [4] IMPLICIT SEQUENCE { -- describes size and properties of result set numRecordsWanted [1] IMPLICIT INTEGER OPTIONAL, -- max records in the result set. rsvThresholdValue [2] IMPLICIT IntUnit OPTIONAL -- If included, all docs in -- result set must have RSV >= -- rsvThresholdValue. This should -- be between 0 and 1. } OPTIONAL} ServerClientInfo ::= SEQUENCE { -- Not completely worked out; must wait until Advanced Search group -- works out specifics of how the reformulated (marked-up) query & its -- associated meta-data is to be returned to the client. intUnit [1] IMPLICIT IntUnit OPTIONAL, -- Scaled integer humanString [2] IMPLICIT HumanString OPTIONAL, metaData OtherInformation OPTIONAL -- Data (eg collection frequency) attached to an -- operand. We may flesh this out some after -- operational experience. } RQOperator ::= SEQUENCE { operator [1] CHOICE { rqIndep [1] IMPLICIT NULL, -- The operands are independent of each other. -- Increasing a particular operand's RSV will -- guarantee the clause RSV will not decrease. rqAND [2] IMPLICIT IntUnit, -- Ranked AND. This server-dependent operator -- emphasizes, but does not require, the presence of -- all operands. The server may ignore the integer -- value, but if it does not, then the value of rqAND -- is a number between 0 and 1 giving the degree to -- which satisfaction of all operands should be -- emphasized. 1 indicates all operands must be -- satisfied (ie, all operands must have non-zero RSV -- in order for clause RSV to be non-zero.) rqOR [3] IMPLICIT IntUnit, -- Ranked OR. This server-dependent operator -- emphasizes the presence of a single operand. -- A clause RSV will be zero iff all operands are -- zero. The server may ignore the integer -- value, but if it does not, then the value of rqOR -- is a number between 0 and 1 giving the degree to -- which satisfaction of an operand is to be -- considered equivalent to the satisfaction of the -- other operands. 1 indicates all operands are -- equivalent. rqANDNOT [4] IMPLICIT IntUnit, -- Ranked ANDNOT. This server-dependent operator -- emphasizes, but does not require, the presence of -- the first operand and the absence of all other -- operands. The server may ignore the integer -- value, but if it does not, then the value of -- rqANDNOT is a number between 0 and 1 giving the -- degree to which satisfaction and non-satisfaction -- (zero-valued) of the operands should be emphasized. -- 1 indicates the first operand must be satisfied -- (non-zero RSV) and the second operand must have -- zero RSV in order for clause RSV to be non-zero. rqHeadRelation [5] IMPLICIT SEQUENCE { -- The first operand is related to each operand -- (independently) in a fashion described by -- RQHeadRelation. The operand weights (between 0 -- and 1) describe the strength of the relationship. -- Examples might be synonyms, antonyms, ISA, thesauri -- classes, etc. tagType [1] IMPLICIT INTEGER OPTIONAL, -- default tagset-RQRelation tagValue StringOrNumeric -- value (probably from tagset-RQRelation) -- indicating the relationship between the -- first operand of the StructuredOperand -- and the remaining operands. The server -- will use this relationship information -- to determine a RSV for this clause. }, other [6] IMPLICIT EXTERNAL -- Other operators, not guaranteed to be understood -- by client. } allowedReform [2] IMPLICIT BOOLEAN -- allowed to replace this operator. If false, and the -- server does not support the operator, then this part -- of the search fails. } Ray Denenberg Library of Congress 202-707-5795 ray@rden.loc.gov