Relational operators may be used in search entries - changes
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 13 Oct 1995 15:35:27 +0000 (15:35 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 13 Oct 1995 15:35:27 +0000 (15:35 +0000)
in proc index-query.

client.tcl
clientrc.tcl

index 7b528c9..5059a97 100644 (file)
@@ -4,7 +4,11 @@
 # Sebastian Hammer, Adam Dickmeiss
 #
 # $Log: client.tcl,v $
-# Revision 1.70  1995-10-12 14:46:52  adam
+# Revision 1.71  1995-10-13 15:35:27  adam
+# Relational operators may be used in search entries - changes
+# in proc index-query.
+#
+# Revision 1.70  1995/10/12  14:46:52  adam
 # Better record popup windows. Next/prev buttons in popup record windows.
 # The record position in the raw format is much more visible.
 #
@@ -2800,6 +2804,32 @@ proc index-query {} {
         if {$term != ""} {
             set attr [lrange [lindex $queryInfoFind [lindex $b 1]] 1 end]
 
+            set relation ""
+            set len [string length $term]
+            incr len -1
+
+            if {$len > 1} {
+                if {[string index $term 0] == ">"} {
+                    if {[string index $term 1] == "=" } {
+                        set term [string trim [string range $term 2 $len]]
+                        set relation 4
+                    } else {
+                        set term [string trim [string range $term 1 $len]]
+                        set relation 5
+                    }
+                } elseif {[string index $term 0] == "<"} {
+                    if {[string index $term 1] == "=" } {
+                        set term [string trim [string range $term 2 $len]]
+                        set relation 2
+                    } elseif {[string index $term 1] == ">"} {
+                        set term [string trim [string range $term 2 $len]]
+                        set relation 6
+                    } else {
+                        set term [string trim [string range $term 1 $len]]
+                        set relation 1
+                    }
+                }
+            } 
             set len [string length $term]
             incr len -1
             set left 0
@@ -2820,6 +2850,9 @@ proc index-query {} {
             } elseif {$left} {
                 set term "@attr 5=2 ${term}"
             }
+            if {$relation != ""} {
+                set term "@attr 2=${relation} ${term}"
+            }
             foreach a $attr {
                 set term "@attr $a ${term}"
             }
index 38d5c03..49c8248 100644 (file)
@@ -1,6 +1,6 @@
 # Setup file
 set {profile(Penn)} {{Penn State's Library} 128.118.88.200 210 {} 16384 8192 tcpip CATALOG 1 {} {} Z39 2}
-set {profile(ztest)} {{test server} localhost 8889 {} 16384 4096 tcpip dummy 1 {} 1 Z39 3}
+set {profile(ztest)} {{test server} localhost 210 {} 16384 4096 tcpip dummy 1 {} 1 Z39 3}
 set {profile(madison)} {{University of Wisconsin-Madison} z3950.adp.wisc.edu 210 {} 16384 8192 tcpip madison 1 {} {} Z39 22}
 set {profile(bibsys)} {{BIBSYS Target (YAZ-based)} z3950.bibsys.no 2100 {} 16384 8192 tcpip BIBSYS 1 {} 1 Z39 27}
 set {profile(Default)} {{} {} {210} {} 16384 8192 tcpip {} 1 {} {} {} 28}
@@ -11,11 +11,11 @@ set {profile(DANBIB)} {{SR Target DANBIB} 0103/find2.denet.dk 4500 {} 8192 8192
 set {profile(OCLC)} {{OCLC First search engine} z3950.oclc.org 210 {} 16384 8192 tcpip {ArticleFirst BiographyIndex BusinessPeriodicalsIndex} 1 {} {} Z39 9}
 set {profile(adad)} {a {} 210 {} 16384 8192 tcpip {} 1 {} {} Z39 26}
 set {profile(CARL)} {{CARL systems} Z3950.carl.org 210 {} 16384 8192 tcpip {ACC AIC AUR BEM CUB DPL DNU EPL FRC LAW LCC MCC MIN MPL NJC NWC OCC PPC PUE RDR RGU SPL TCC TKU UNC WYO} 1 {} {} Z39 11}
-set {profile(Innovative)} {{Innovatives server: demo.iii.com} demo.iii.com 210 {} 16384 8192 tcpip DEFAULT 1 {} {} Z39 12}
 set {profile(CLSI)} {CLSI inet-gw.clsi.us.geac.com 210 {} 16384 8192 tcpip cl_default 1 {} {} Z39 13}
+set {profile(Innovative)} {{Innovatives server: demo.iii.com} demo.iii.com 210 {} 16384 8192 tcpip DEFAULT 1 {} {} Z39 12}
 set {profile(AULS)} {{Acadia university} auls.acadiau.ca 210 {} 16384 8192 tcpip AULS 1 {} {} Z39 14}
-set {profile(canberra)} {canberra canberra.cs.umass.edu 2110 {} 30000 30000 tcpip cacm_dots 1 {} {} Z39 25}
 set {profile(dranet)} {dranet dranet.dra.com 210 {} 16384 16384 tcpip drewdb 1 {} 1 Z39 15}
+set {profile(canberra)} {canberra canberra.cs.umass.edu 2110 {} 30000 30000 tcpip cacm_dots 1 {} {} Z39 25}
 set queryTypes {Simple phrase}
 set queryButtons {{ {I 0} {I 1} {I 2} } {{I 0} {I 1} {I 0}}}
 set queryInfo {{ {Title {1=4}} {Author {1=1}} {Subject {1=21}} {Any {1=1016}}} {{Title 1=4 4=1 6=2} {Author 1=1003 4=1 6=2} {ISBN 1=7} {ISSN 1=8} {Year 1=30 4=4 6=2} {Any {}}}}