How do I correctly use session search?

While creating a session I create custom settings for the session like so,

SessionSettings = MakeShareable(new FOnlineSessionSettings());

Then I set a custom setting for the session using,

SessionSettings->Set(SEARCH_KEYWORDS, MatchTag, EOnlineDataAdvertisementType::ViaOnlineService);

Where MatchTag is a fstring that I set to “1V1”

Then while finding sessions, I create a custom search settings,

SessionSearch = MakeShareable(new FOnlineSessionSearch);

And set a custom search query like so,

SessionSearch->QuerySettings.Set(SEARCH_KEYWORDS, MatchTag, EOnlineComparisonOp::Equals);

But here I pass-in an fstring that has “2V2” in MatchTag.

The problem is that the session that was registered with “1V1” as the MatchTag, is being returned as a search result where I passed “2V2” as query setting in MatchTag.

I have even checked the Match tag on the result and it is displayed as “1V1”, but why is this result even returned when I did not search for it in the query ?

Ok, Search settings do not work for LAN Sessions for some reason, but if you create online sessions using steam, they are filtered correctly. I am now filtering these sessions in onFindSessionsComplete(),

if (SessionSearch->SearchResults.Num() > 0)
{
    for (int32 SearchIdx = 0; SearchIdx < SessionSearch->SearchResults.Num(); SearchIdx++)
    {
        if (bIsLanSession)
        {
            for (auto setting : SessionSearch->SearchResults[SearchIdx].Session.SessionSettings.Settings)
            {
                UE_LOG(LogTemp, Warning, TEXT("Key : %s , Value : %s"), *setting.Key.ToString(), *setting.Value.ToString());
                if (setting.Key == SEARCH_KEYWORDS && setting.Value.Data == MatchTag)
                {
                    // Yup this is correct LAN result, join it or add it to a array 
                }
                else
                {
                    //Not the session you were looking for...
                }
            }
        }
    }
}