Try Now
More in this section

Forums / General Discussions / Calling Search via API

Calling Search via API

4 posts, 0 answered
  1. Jerami
    Jerami avatar
    12 posts
    31 Mar 2011
    19 Aug 2011
    Link to this post
    Im working on a search implementation that will require me to get the search results from Sitefinity using the API. Previously I was using this:

    var searchManager = SearchManager.GetManager(null);
    var searchQuery = string.Format("*{0}*",searchTerm);
    var results = searchManager.Find("sitefinity-content-index", searchQuery);

    This doesn't seem to return any results? 

    Is there a better way to go about this in Sitefinity 4.2?
  2. Milena
    Milena avatar
    75 posts
    15 Jul 2016
    24 Aug 2011
    Link to this post
    Hi Jerami,

    At the moment search via query that contains wildcard at the beginning of a word is disabled because of additional performance hit with large indexes. For more information http://manfredlange.blogspot.com/2010/07/wildcard-searches-in-lucenenet.html

    At the moment we do not have a automatic configuration that can turn on the search via query that contains wildcard at beginning of a word. I logged a task that will allow easy configuration of the Query Parser.

    If you need a working solution ASAP I can provide you with details how to replace the LuceneSearchProvider and which classes to override in order to configure Query Parser to allow leading wildcard search.

    Let me know about your decision! 
    Thanks for sharing this valuable feedback!

    Best wishes,

    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. NimitV
    NimitV avatar
    68 posts
    06 Apr 2010
    20 Mar 2013 in reply to Milena
    Link to this post

    I need this functionality. Can you provide me with the details mentioned on how to replace the LuceneSearchProvider and which classes to override?

  4. Jen Peleva
    Jen Peleva avatar
    568 posts
    10 Sep 2016
    25 Mar 2013
    Link to this post
    Hello Jerami,

    Please take a look at this blog post for information how to replace the Lucene provider:


    Jen Peleva
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
4 posts, 0 answered