Add sorting support:
[irspy-moved-to-github.git] / zebra / pqf.properties
1 # $Id: pqf.properties,v 1.8 2006-09-19 16:29:05 mike Exp $
2 #
3 # Properties file to drive the YAZ CQL-to-PQF converter for Zebra.
4 # This specifies the interpretation of various CQL indexes, relations,
5 # etc. in terms of Type-1 query attributes.
6
7 # Identifiers for prefixes used in this file. (index.*)
8 set.cql         = info:srw/cql-context-set/1/cql-v1.1
9 set.rec         = info:srw/cql-context-set/2/rec-1.1
10 set.net         = info:srw/cql-context-set/2/net-1.0
11 set.dc          = info:srw/cql-context-set/1/dc-v1.1
12 set.zeerex      = info:srw/cql-context-set/2/zeerex-1.1
13 set.sort        = http://irspy.indexdata.com/cql/sort/1.0
14
15 # The default set when an index doesn't specify one: Net
16 set             = info:srw/cql-context-set/2/net-1.0
17
18 # The default index when none is specified by the query
19 index.cql.serverChoice                  = 1=cql:all
20
21 index.cql.anywhere                      = 1=cql:all
22 index.cql.allRecords                    = 1=_ALLRECORDS 2=103
23 index.rec.id                            = 1=rec:id 4=3
24 index.net.protocol                      = 1=net:protocol
25 index.net.version                       = 1=net:version 4=3
26 index.net.method                        = 1=net:method
27 index.net.host                          = 1=net:host 4=3
28 index.net.port                          = 1=net:port 4=3
29 index.net.path                          = 1=net:path
30 index.dc.title                          = 1=dc:title
31 index.dc.creator                        = 1=dc:creator
32
33 # Sorting indexes
34 #   ### These are deprecated in favour of the relation modifiers below
35 #       -- i.e. instead of "net.port=3950 or sort.title=0", use
36 #       "net.port=3950 or dc.title/sort=0".  This approach has the
37 #       benefit that only two new entities (sort and sort-desc) need
38 #       be added in total, rather than two per sortable index.
39 index.sort.title                        = 7=1 1=dc:title
40 index.sort.title-desc                   = 7=2 1=dc:title
41
42 # Relation attributes are selected according to the CQL relation by
43 # looking up the "relation.<relation>" property:
44 #
45 relation.<                              = 2=1
46 relation.le                             = 2=2
47 relation.eq                             = 2=3
48 relation.exact                          = 2=3
49 relation.ge                             = 2=4
50 relation.>                              = 2=5
51 relation.<>                             = 2=6
52
53 # BIB-1 doesn't have a server choice relation, so we just make the
54 # choice here, and use equality (which is clearly correct).
55 relation.scr                            = 2=3
56
57 # Relation modifiers.
58 #
59 relationModifier.relevant               = 2=102
60 relationModifier.fuzzy                  = 5=103
61         ### truncation=regExpr-2 (5=102) in Zebra is "fuzzy matching"
62 relationModifier.stem                   = 2=101
63 relationModifier.phonetic               = 2=100
64 relationModifier.regexp                 = 5=102
65
66 # Non-standard extensions to provoke Zebra's inline sorting
67 relationModifier.sort                   = 7=1
68 relationModifier.sort-desc              = 7=2
69
70 # Position attributes may be specified for anchored terms (those
71 # beginning with "^", which is stripped) and unanchored (those not
72 # beginning with "^").  This may change when we get a BIB-1 truncation
73 # attribute that says "do what CQL does".
74 #
75 position.first                          = 3=1 6=1
76         # "first in field"
77 position.any                            = 3=3 6=1
78         # "any position in field"
79 position.last                           = 3=4 6=1
80         # not a standard BIB-1 attribute
81 position.firstAndLast                   = 3=3 6=3
82         # search term is anchored to be complete field
83
84 # Structure attributes may be specified for individual relations; a
85 # default structure attribute my be specified by the pseudo-relation
86 # "*", to be used whenever a relation not listed here occurs.
87 #
88 structure.exact                         = 4=108
89         # string
90 structure.all                           = 4=2
91 structure.any                           = 4=2
92 structure.*                             = 4=1
93         # phrase
94
95 # Truncation attributes used to implement CQL wildcard patterns.  The
96 # simpler forms, left, right- and both-truncation will be used for the
97 # simplest patterns, so that we produce PQF queries that conform more
98 # closely to the Bath Profile.  However, when a more complex pattern
99 # such as "foo*bar" is used, we fall back on Z39.58-style masking.
100 #
101 truncation.right                        = 5=1
102 truncation.left                         = 5=2
103 truncation.both                         = 5=3
104 truncation.none                         = 5=100
105 truncation.regexp                       = 5=102
106 truncation.z3958                        = 5=104
107
108 # Finally, any additional attributes that should always be included
109 # with each term can be specified in the "always" property.
110 #
111 #always                                 = 6=1
112 # 6=1: completeness = incomplete subfield