Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SearchResult Search(SearchQuery query);

Parameters:

  • SearchQuery query

Expand
titleSearchQuery properties
Code Block
    public string ClientGuid { get; set; }

    public string IndexName { get; set; }

    public string Keyword { get; set; }

    public int PageNo { get; set; }

    public int MaxPerPage { get; set; }

    public string SortBy { get; set; }

    public string CustomUrl { get; set; }

    public string SortingSetCode { get; set; }

    public string SearchWithin { get; set; }

    public List<string> FacetOverride { get; set; }

    public List<string> FieldOverride { get; set; }

    public ClientData ClientData { get; set; }

    public bool IsInPreview { get; set; }

    public string ExplainDocId { get; set; }

    public List<object> SmartBar { get; set; }

    public bool BoostAndBury { get; set; }

    public bool VisibilityRules { get; set; }

    public bool PersonalizedBoost { get; set; }

    public bool PopularityBoost { get; set; }

    public bool ItemPin { get; set; }

    public bool Is100CoverageTurnedOn { get; set; }

    public Dictionary<string, List<object>> FacetSelections { get; set; }

The SearchQuery object should contain all the information needed to make the request to the Hawksearch API. The mandatory ones are ClientGuid,IndexName,Keyword and FacetSelections.

Returns:

  • SearchResult

The Hawksearch API responds with a message which is the mapped to an object of type SearchResult

...

Expand
titleResult properties
Code Block
    public Guid DocId { get; set; }

    public long Score { get; set; }

    public Dictionary<string, List<string>> Document { get; set; }

    public Redirect BestFragments { get; set; }

    public bool IsPin { get; set; }

Usage

Call this method when you want to make search requests to the Hawkseach API.