I would like to see an option be added to modify the Content Ranking in the regular Search...

Currently you can tell the Seach Results to favor Keyword Relevance or Recently Posted more than the other. I'd like to see this expanded to Favor one Node Type over the other more...for example I have Pages and Projects. I want Search to Favor Page node types more than Project node types, but still display those results...so I guess we're talking about altering the ranking...

Thoughts?

Comments

jbomb’s picture

It seems that this more "tricky" than it sounds. The search module provides one menu item for each module that implements hook_search. Each menu item provides the return value of its respective implementation's "name" operation to the search_view page callback as an argument, which is used to invoke a single hook_search implementation's 'search' operation....

It's hard to follow, but it basically means that this would require that we add a full hook_search implementation to search_config that basically duplicates the node module's hook_search implementation with a few additions. This search implementation would then exist along side of the node module's search unless that was somehow hidden with hook_menu_alter().

I'm not sure how I feel about all of that, but perhaps someone else has something else in mind that I overlooked.

[edit]

You might try Fuzzy Search.

Alan D.’s picture

Version: 6.x-1.6 » 7.x-1.x-dev

Implementing hook_ranking() provides an easy hook to alter this in D7, but I'm not sure what the interface to this would be...?

Alan D.’s picture

And to avoid one big sql conditional, we would need another table to handle this data...

Alan D.’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Year, the search "hooks" are not hooks as they are directly invoked.

Not a lot of interest and seems complicated, so closing sorry.

@jbomb
I managed to override the core indexing method in 7.x by a hook_module_implements_alter() of CRON, replacing search_cron() with search_config_cron(), this allowed me to manually call our replacements for node_update_index() and the admin form alter to update the text on node_search_status().

#1977798: Option to eliminate entries from search_index and search_dataset