Will Smith has secured a partial legal victory after a California judge struck down significant parts of a sexual harassment lawsuit brought against the actor by violinist Brian King Joseph.