Archive of UserLand's first discussion group, started October 5, 1998.

problem with 8/20/1999 SE (searchEngine) changes

Author:Thomas A. Creedon
Posted:8/22/1999; 11:30:31 AM
Topic:problem with 8/20/1999 SE (searchEngine) changes
Msg #:9773
Prev/Next:9772 / 9774

Problem solved if you get the latest mR (mainResponder) update. 8/22/1999; 14:15:00 Pacific Time USA - Thomas

Hello all,

First, let me thank all the people at Userland for making the changes to the SE (searchEngine) to open it up to indexing numbers and small words. I really needed that feature in my context. I had made my own modifications to the SE scripts to support number indexing. Now I don't have to worry about maintaining those custom scripts! Yahoo!

I've been working with the latest 8/20/1998 SE changes and I was having a problem.

I'm using mainResponder.search.utilities.indexDiscussionGroup to index my DG (discussion group) over again. I ran the script and shortly got the error: "Can't create item "index." because "" is an illegal name.". I clicked on the "Go To" button in the Error Info window and was taken to mainResponder.search.server.indexOnePage, to the following if block:

if not defined (adrLetter^) {
	new (tableType, adrLetter)}
                                 ^cursor pointing just before here
So I reran the script in debug mode and checked some values and found these:
adrLetter	address:	@["Frontier:Frontier™ v6.0 ƒ:Guest Databases:ops:Index.root"].index
firstLetter	string:	
oneWord	string:	
adrLetter is pointing to the index table itself, not a letter table. firstLetter and oneWord are both strings of size 0. Somewhere along the line, those values became empty.

So I dug a bit more and found that if the text being indexed contains some text like so...

martians land on earth , have some coffee, and buzz off!

...the script sets oneWord to "," because it's surrounded by spaces. The script does some cleaning after the oneWord is set and we end up with nothing, which causes the address problem I saw.

Here is what I did to fix mainResponder.search.server.indexOnePage so it worked for me. Don't do this unless you know what you are doing! I put in a check for a word of zero length. I put my check in below this commented out if block...

if sizeOf (oneWord) < 3 //we don't index very short words, except for "op" and "wp"
Here's the check I put in...
if sizeOf (oneWord) == 0 {
	continue}



There are responses to this message:


This page was archived on 6/13/2001; 4:52:02 PM.

© Copyright 1998-2001 UserLand Software, Inc.