Question: I have static classes `A`,`B` and `C` like

```
public static class A
{
    public static bool SampleMethod()
    {
        ...
    }
}

public static class B
{
    public static bool SampleMethod()
    {
        ...
    }
}

public static class C
{
    public static bool DoStuff(Enum dataType)
    {
        Type targetClass = null;
        switch (dataType)
        {
            case DataType.1:
                targetClass = typeof(A);
                break;
            case DataType.2:
                targetClass = typeof(B);
                break;
        }

        return targetClass.SampleMethod();
    }
}

```

Im trying to set variable `targetClass` with name of the class. The method im trying to access in class `A` and `B` is with same name. However im getting an error like 

> 
> Type doesnot contain definition for 'SampleMethod'
> 
> 
>

Answer: 
Look at `cts:boost-query`: it takes a primary query that has to match and a secondary query that just affects the score.
You can alter the score based on the distance of a value in the document from a target value. See:

```
http://docs.marklogic.com/guide/search-dev/relevance#id_45452

```

You can also set the quality on the document to influence scoring. See:

```
http://docs.marklogic.com/guide/search-dev/relevance#id_68032

```

Hoping that helps.