Try our conversational search powered by Generative AI!



Hi Friends

I want to implement GetDidYouMean with size attribute. Can you provide me with a sample code?

Syntax: GetDidYouMean(string query,Action)

Aug 23, 2016 22:09


here is an example:

SearchClient.Instance.Statistics().GetDidYouMean("hi there", x => x.Size = 10);

You can also use:

 SearchClient.Instance.Statistics().DidYouMean("hi there", 10);
Edited, Aug 24, 2016 7:52

Thanks Magne... "GetDidYouMean" works...  

Initially I used "DidYouMean" and it always returns 0 results for me, i even updated latest FIND DLL. Its ok.. I will use "GetDidYouMean"

If possible can you tell me the differance between "GetDidYouMean" and "StatisticsDidYouMean" ?

Edited, Aug 24, 2016 15:20

StatisticDidYouMean is just a wrapper for DidYouMean, with the default tags set and size set to 1:

    public static DidYouMeanResult StatisticsDidYouMean(this IStatisticsClient client, string query, int size = 1, IEnumerable<string> tags = null)
      return client.GetDidYouMean(query, (Action<DidYouMeanCommand>) (x =>
        x.Size = new int?(size);
        x.Tags = StatisticsClientExtensions.AddDefaultTags(tags);
Aug 25, 2016 8:20

Thanks a lot Magne.

Aug 25, 2016 16:02
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.