Calling Search via API
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);
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,
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 >>
Hi,
I need this functionality. Can you provide me with the details mentioned on how to replace the LuceneSearchProvider and which classes to override?
Thanks,
Steve
Hello Jerami,
Please take a look at this blog post for information how to replace the Lucene provider:
www.sitefinity.com/.../search_index_with_custom_fields_in_sitefinity_4