searching for words with "/" in them

User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

searching for words with "/" in them

Post by Thunderstone »



Hello again! The search engine is now working beautifully; however, we've
run into an interesting problem. This company has a lot of products with
the "/" in their names (e.g., Window/Washer). However, because of the REX
pattern matcher, I guess the search engine interprets "/" as the beginning
of a regular expression.

I don't think any of the users of this site will want to use the REX
feature. Is there any way of turning it off? Any simple workarounds for
this problem? I could instruct users to use the wildcard *
(Window*Washer) but it would be confusing, since so many documents on this
site do have "/" in them.

Thank you for your help!

Katherine Falk



User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

searching for words with "/" in them

Post by Thunderstone »



=cc=Katherine Falk said:

Searching for the words
window washer
should find those products, which should rank high since the words are
next to each other.

A / in the middle of a term does not begin a REX expression, so
"window/washer" will be treated as a single term. However the index
normally only indexes letters and digits, so you would need to tell it
to also index /. You could do this with:

gw -unindex
gw -k"\alnum{2,30}" -k"\alnum=[\alnum/]{1,29}" -index

This would ensure that searches for "window" or "washer" would still work,
as well as "window/washer".


sduggan
Posts: 84
Joined: Tue Mar 20, 2001 9:16 am

searching for words with "/" in them

Post by sduggan »

Hello,

When trying to run gw -unindex so I can index "/" for my searches I get the following error message:

" 000 Can't get address for host `napplication/pdf/pdf,pdftotx': 0 - unknown winso
ck error
Visited 0 pages total "

I used: napplication/pdf/pdf,pdftotx to index my pdf's, but seems to be causing a problem when trying to run "-unindex", so what do I have to do to get it to index the "/"

Thanks,
ShaWn
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

searching for words with "/" in them

Post by mark »

What's the full command line you're using for -unindex? You shouldn't need any options with it except, maybe -d .
sduggan
Posts: 84
Joined: Tue Mar 20, 2001 9:16 am

searching for words with "/" in them

Post by sduggan »

I typed:
gw -unindex http://webdev/

And got this for a message:

"No database specified. Use the default (D:/inetpub/millenium/webinator/db)?
(y/n) default is y : You may use "-d-" to skip this question in the future.

I then typed "y" and got:

Deleting search indices
Getting http://10.100.64.58/robots.txt...Got it...Ok.
Adding todo: http://webdev/
http://webdev/ is already in the database
Visited 0 pages total

I then typed:

gw -k"\alnum{2,30}" -k"\alnum=[\alnum/]{1,29}" -index

and got:
No database specified. Use the default (D:/inetpub/millenium/webinator/db)?
(y/n) default is y : You may use "-d-" to skip this question in the future.
Visited 0 pages total

I hope this helps.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

searching for words with "/" in them

Post by mark »

You shouldn't generally provide a url with -unindex, but it's fairly harmless. Everything you show here indicates that it worked. What's the problem?
sduggan
Posts: 84
Joined: Tue Mar 20, 2001 9:16 am

searching for words with "/" in them

Post by sduggan »

After trying to reindex and getting the messages above, I try to do a search and got:

Warning: Query 'keon' would require linear search

this happened the first time, so I ran -wipe and then re-indexed the site, but then I still couldn't do searches with "/" them, which is what I am trying to accomplish.

If I did a -wipe again and started from scratch, what would be the syntax to type to append to this string:
gw -fasp -n"application/pdf,pdf,pdftotx" http://{sitename}

to reindex my site to be able to do searches with"/" in the search.

Thanks.
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

searching for words with "/" in them

Post by mark »

gw -fasp -n"application/pdf,pdf,pdftotx" -k"\alnum{2,30}" -k"\alnum=[\alnum/]{1,29}" http://{sitename}
sduggan
Posts: 84
Joined: Tue Mar 20, 2001 9:16 am

searching for words with "/" in them

Post by sduggan »

Mark,
I've done this twice and still any time I do a search, eg. "ace/server" it comes up "No documents matched your query. " but if I type in "ace server" I get documents with "ace/server" in them, but our customers need to be able to type in a search with \ in it.

Any help would be great

Thanks
Shawn
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

searching for words with "/" in them

Post by mark »

Oops, this
-k"\alnum=[\alnum/]{1,29}"
should be
-k">>\alnum=[\alnum/]{1,29}"
Post Reply