alexshyba / SitecoreSearchContrib

Extension to Sitecore.Search namespace. Includes AdvancedDatabaseCrawler and Searcher. Make sure to check out the website for the project.
http://sitecorian.github.io/SitecoreSearchContrib
25 stars 21 forks source link

Boost for Fields aren't working #30

Closed RobAhnemann closed 11 years ago

RobAhnemann commented 11 years ago

In SearchField.cs, this method is borked. It's always setting Boost to 1.

public void SetBoost(string boost)
{
     float boostReturn;

     if (float.TryParse(boost, out boostReturn))
     {
        Boost = boostReturn;
     }

     Boost = 1;
}

I recommend:

public void SetBoost(string boost)
{
        float boostReturn = 1;

        float.TryParse(boost, out boostReturn);

        Boost = boostReturn;
}
alexshyba commented 11 years ago

Oops. This is just stupid. Thanks! Fixed.