Author |
Topic |
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 16 November 2007 : 07:30:26
|
I'm trying to figure out a way to not include search terms that are found within a hyperlink while searching posts.
For example, if I were searching for the word blue, I would not expect to find it hidden in a link that is hidden beneath text such as like this (Note: I had to add a space after the [ bracket to avoid my example being formatted by the forum code):
[ url="http://www.blue.com"]This is my web site[ /url]
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 November 2007 : 08:33:05
|
not much you can do about that I'm afraid since the link contains the word you are searching for it will allways find it, SQL does not know anything about forumcode so has no way of skipping it when searching |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 16 November 2007 : 08:34:29
|
k, thanks, Huw ... one can always hope that a workaround is in our midst! |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 November 2007 : 08:36:56
|
quote: Originally posted by Etymon
k, thanks, Huw ... one can always hope that a workaround is in our midst!
very doubtful it would require a significant amount of code and a lot more processing time to filter out such results as it would have to be done after the search query has returned a resultset |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 16 November 2007 : 08:40:01
|
Isn't there a way to filter the results that rest between the [ url ] and [ /url ] tags? |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 16 November 2007 : 08:41:07
|
Or even have a notice like:
<- (This link contains search results) |
Edited by - Etymon on 16 November 2007 08:41:32 |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
Posted - 17 November 2007 : 10:28:44
|
The other option would be to treat each search term as a seperate word, so instead of looking for "blue" in the database, you'd be looking for all instances of the word "blue", at the start of a line, surrounded by spaces, followed by a dot, question mark, exclamation mark or a comma.
You could use the advanced search page to select this type of search, or make it default if only one word is provided in the search box.
Just an idea. |
portfolio - linkshrinker - oxle - twitter |
Edited by - MarcelG on 17 November 2007 10:29:00 |
|
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
MarcelG
Retired Support Moderator
Netherlands
2625 Posts |
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 19 November 2007 : 03:23:15
|
Hi Marcel,
Hey, thanks for the input there. I'll try the options and see what I come up with.
Cheers,
Etymon
|
|
|
|
Topic |
|