1

In Solr GUI I am seeing that when I am in the analyzer tab, it is removing stop words and returning results. But when I try to retrieve same result using the Sitecore search API it is not removing stop words and returning results. Could someone please assist me in how I can return results with Sitecore api which removes stop words?

here is my api call:

ISearchIndex searchIndex = ContentSearchManager.GetIndex(IndexName);
IProviderSearchContext searchContext = searchIndex.CreateSearchContext();
filteredItem = searchContext.GetQueryable<SearchResult>();
0

The feature you are asking for is not really supported by Solr. The fields you return from (defined by the fl parameter - automatically calculated by Sitecore) define to Solr that you want the field value (retrieved from the stored fields in Solr) - which is the original value.

I have not tried to retrieve an unstored field - that might return the post-analysis field value - but I dont think so. you might get by using the analysis API (just like the admin does) - but from a performance perspective it might not be good.

I cannot imagine what the use case actually is? maybe hithilighting might help you get what you something usefult - but I am not sure what use case for this is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.