I am working on a Magento site, and i would like to edit the default search result.
Editing search result is not editing the appearance of search result but the actu
You will need to modify some of the models in catalogsearch module, this link has a good explanation of how to override Core classes. In your case you will need to add your logic somewhere in the Query model or its resource or collection models.
This CMS Search extension will provide an excellent example of how to extend the default search. It adds extra content into the search index and allows you to control how those results are presented to the searcher.