Suggest "Try also" terms

Improve an existing search service: help the user to understand the search results quicker and to formulate the search query more efficiently.
Suggest "Try also" terms
GetExpansionSuggestions
input: string Query, string[] Documents, enum DocumentFormat, int NumberOfResults
output: QueryTermInfo[] ExpansionSuggestionsResult

Takes as an input a Query, a list of Documents and their DocumentFormat : text or URL, as well as the NumberOfResults to restrict the set of expansion suggestions.


It is assumed that the documents match the query, e.g. were returned by a search engine.

Computes equivalent terms to include into the query, filtered by terms found in the input documents.

The QueryTermInfo object stores the original query term and a collection of recommended synonyms and their scores.


Equivalent terms include synonyms, e.g. credit crunch and credit crisis, abbreviations, e.g. US and United States,
and sometimes related grammatical forms or just similar terms.


See also Alternative search terms.

Sample code in C#:

PingarAPIRequest request = new PingarAPIRequest();
request.AppID = "your app id";
request.AppKey = "your app key";
request.SearchSupport = new SearchSupportRequest();
request.SearchSupport.Query = "sample query";
request.SearchSupport.NumberOfResults = 5;
request.SearchSupport.Documents = new string[] { "document text" };
request.SearchSupport.DocumentsFormat = DocumentFormat.Text;
request.Language = Language.EN;

PingarAPIServiceSoapClient pingarAPI = new PingarAPIServiceSoapClient();
PingarAPIResponse response = pingarAPI.GetExpansionSuggestions(request);

if (response.Error == null)
{
    foreach (QueryTermInfo termInfo in 
    response.SearchSupport.ExpansionSuggestionsResult)
    {
        if (!termInfo.IsaSuperphrase || termInfo.Recommended == null)
        {
            continue;
        }

        Console.Write("Expansion Suggestions for the query term " + termInfo.Title);

        foreach (RecommendedTerm term in termInfo.Recommended)
        {
            Console.Write(term.Title + " (" + term.Score + ") ");
        }
    }
}

 
VIEW DEMO OF RAPID DISCOVERY COMPONENTS
 

Explore Pingar


Share Points CIO Apache Solr BizSpark