Project:Search 404
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:zyxware
Status:closed (fixed)

Issue Summary

Using pathauto can often lead to having classifications of content where all the path does not match the content.
+ $keys = basename($keys);
would work better IMHO.

Comments

#1

Version:master» 6.x-1.x-dev
Assigned to:Anonymous» zyxware
Status:active» postponed (maintainer needs more info)

Where should I make this change in the code?

Is it for search404_get_keys() function?

Also can you give me an example of the above mentioned scenario so that I can understand it better?

Thank You

Regards
Santhosh Raju

#2

A user hits a 404 path like http://www.domain.com/photography/architecture/exterior/roman_colliseum

So the key becomes the whole path, so if you moved this content to
http://www.domain.com/photography/travel/roman_colliseum
The search and redirect fails.

If you put the basename function on it and just search on "roman_colliseum", then everything works as expected.

function search404_get_keys() {
line 42

#3

Status:postponed (maintainer needs more info)» active

Marking as active.

@sgriffin - Can't you just use a regular expression ([^\/]*\/)* for the PCRE filter and get the same effect?

But yes this feature might make sense as a simple checkbox for the user.

#4

LOL. Quite possibly so if I was a regex expert.
However, for organized paths, it might make sense to fall back or ORS instead of ands to improve results.
By using a basename, for the last url I am stating that it is the only thing that is important and guaranteeing a proper redirect.
Im not exactly sure what it is searching on or if it is using and..
Is it doing a search for "photography && architecture && exterior && roman_colliseum"?
I think it's more logical to search for "photography || architecture || exterior || roman_colliseum"

In any case, I'm quite happy with this module, its a major benefit for drupal!
Thanks for the good work!

#5

Status:active» fixed

The module only passes on the keys to Drupal Search (or other search modules) to perform the actual search. There is already an option in the module to add OR operator in between the keywords. The default drupal search uses implicit AND between keywords.

Marking issue as fixed since the feature is already present in some form.

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here