Somehow, since yesterday, I can't get swish-e to execute from the witango app server, though I can su witango and execute my scriptfrom the shell.
With the app server I get no results (debug follows) External Action] [50] Forking process [External Action] [87] Waiting on the child process [External Action] [186] Error: No child processes [External Action] [186] Waiting done [ActionResults] [187] [External Action] [188] Complete To confirm that witango is passing infor to the shell, I commented out my swish-e line, and just show the environment variables (script follows) #!/bin/sh env #swish-e -w $QUERY This executes properly from the witango server, with the following results (including the environment variable $QUERY that I want to pass to swish-e). (results follow) WITANGO_CONFIG=/usr/local/witango/configuration CONSOLE=/dev/console TERM=linux QUERY=children JAVA_LIB=/usr/java/j2re1.4.1_03/lib/i386 LC_ALL=en_US INIT_VERSION=sysvinit-2.84 PATH=/usr/local/witango:/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin _=/bin/env runlevel=5 RUNLEVEL=5 WITANGO_PATH=/usr/local/witango PWD=/usr/local/witango/Logs/log.WitangoServer JAVA_HOME=/usr/java/j2re1.4.1_03 WITANGO_USER=witango LANG=en_US.UTF-8 XFILESEARCHPATH=/usr/dt/app-defaults/%L/Dt previous=N PREVLEVEL=N SHLVL=3 HOME=/ ODBCINI=/etc/odbc.ini DYLD_LIBRARY_PATH=/usr/lib:/usr/local/lib CLASSPATH=/usr/local/witango/jdbc_drivers/:/usr/local/witango ODBCSEARCH=ODBC_USER_DSN ODBCINSTINI=/etc/odbcinst.ini Interestingly, the debug (below) also shows an error in the child process: [External Action] [53] Forking process [External Action] [76] Waiting on the child process [External Action] [169] Error: No child processes [External Action] [170] Waiting done [ActionResults] [172] WITANGO_CONFIG=/usr/local/witango/configuration [External Action] [172] Complete Do you have any ideas on what's going on? (The witango.log shows similar info to the debug output). >Yes -- exactly what I was looking for. > >Each line is already delimited by a CR, and I can choose the column >delimiter with a command line switch. The only issue is if a CR gets >returned in the results. I don't think this will happen, even indexing >.PDF and .DOC, because swish-e uses filters to convert these to HTML >before indexing. > > > >> >>I thought of an easier way to do this. You could turn the resultSet >>into a string, adding <@CRLF> at the end of each line. Then turn the >>string into an array using CDELIM="<@CHAR 9>" and RDELIM="<@CRLF>" to >>get the appropriate dimensions. (Assumimg tabs and returns don't >>appear in the column data.) >> >>- Jeff >> >> >> >> >>>What about @TOKENIZE on each row inside an @ROWS loop? >>> >>>- Jeff >>> >>> >>>>thanks >>>> >>>>resultset is an N rows x 1 column table. >>>> >>>>Any good ideas on splitting this into an N x M table? >>>> >>>>> >>>>>Use an external action to call a script that looks like this: >>>>> >>>>> #!/bin/sh >>>>> swish-e -w $SEARCHSTRING -d \t >>>>> >>>>>The $SEARCHSTRING parameter can be passed from the external action. >>>>>The results will be in request$resultSet, but I don't know what it >>>>>will look like -- try it and see. >>>>> >>>>>Also, the script needs to be inside ABSOLUTEPATHPREFIX. >>>>> >>>>>- Jeff >>>>> >>>>> >>>>>Here's one for you. I use an indexing tool called swish-e (swish-e.org) >>>>>to spider my web sites and provide search results. Anyone who wants to >>>>>know why this is the best thing since sliced bread, contact me off -line. >>>>> >>>>>Anyway, it's really fast, as you can see from my shell query for the word >>>>>"children". It comes with a cgi script that will do highlighting, but >>>>>that is relatively slow (about a factor of 10). Also, this is an >>>>>intranet application, where authentication is required, so I want to >>>>>execute the search from within my witango application. >>>>> >>>>>Question 1. How do I execute the following shell command from within >>>>>witango? >>>>> >>>>>bash-2.05b$ swish-e -w children -d \t >>>>># SWISH format: 2.4.0-pr1 >>>>># Search words: children >>>>># Removed stopwords: >>>>># Number of hits: 87 >>>>># Search time: 0.001 seconds >>>>># Run time: 0.026 seconds >>>>> >>>>> >>>>>Default Results for this query include 4 space separated columns of data >>>>>(though I could specify many other parameters like metatags, body text, >>>>>etc.): >>>>>Relevance (0 to 1000) >>>>>URL (I've changed it to hide this from curious eyes) >>>>>Title tag >>>>>File size >>>>> >>>>> >>>>>1000 >>>>>http://intranet.tothept.com/programs.taf?_function=category_list&_uid1=6 >>>>>"VCS CCMH Children and Youth Division: Program Selection" 32335 >>>>>932 >>>>>http://intranet.tothept.com/programs.taf?_function=category_list&_uid1=2 >>>>>"VCS CCMH Children and Youth Division: Program Selection" 34004 >>>>>920 http://intranet.tothept.com/viewdoc.taf?_uid1=6 "Child and Family >>>>>Mental Health Services Overview" 6290 >>>>>894 http://intranet.tothept.com/viewdoc.taf?_uid1=32 "Services for >>>>>Children 0 to 5 Years Old Overview" 1701 >>>>> >>>>>Question 2. Do the results end up in "resultSet"? These result are tab >>>>>separated (the command line switch: -d \t), so is there an easy way to >>>>>get them into an array, or do I have to tokenize them line by line? >>>>> >>>>>Thanks >>>>> >>>>>Bill Conlon >>>>> >>>>>To the Point >>>>>345 California Avenue Suite 2 >>>>>Palo Alto, CA 94306 >>>>> >>>>>office: 650.327.2175 >>>>>fax: 650.329.8335 >>>>>mobile: 650.906.9929 >>>>>e-mail: mailto:[EMAIL PROTECTED] >>>>>web: http://www.tothept.com >>>> >-- >>>>> >>>>>Jeff Bohmer >>>>>VisionLink, Inc. >>>>>_________________________________ >>>>>303.402.0170 >>>>>www.visionlink.org >>>>>_________________________________ >>>>>People. Tools. Change. Community. >>>>>________________________________________________________________________ >>>>>TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf >>>>> >>>> >>>> >>>>Bill Conlon >>>> >>>>To the Point >>>>345 California Avenue Suite 2 >>>>Palo Alto, CA 94306 >>>> >>>>office: 650.327.2175 >>>>fax: 650.329.8335 >>>>mobile: 650.906.9929 >>>>e-mail: mailto:[EMAIL PROTECTED] >>>>web: http://www.tothept.com >>-- >> >>Jeff Bohmer >>VisionLink, Inc. >>_________________________________ >>303.402.0170 >>www.visionlink.org >>_________________________________ >>People. Tools. Change. Community. >>________________________________________________________________________ >>TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf >> > > >Bill Conlon > >To the Point >345 California Avenue Suite 2 >Palo Alto, CA 94306 > >office: 650.327.2175 >fax: 650.329.8335 >mobile: 650.906.9929 >e-mail: mailto:[EMAIL PROTECTED] >web: http://www.tothept.com > > >________________________________________________________________________ >TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf > Bill Conlon To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 office: 650.327.2175 fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
