solr express
1.0.0
Search
K

Result interceptors

Feature

Intercept results of SOLR before parse in POCO

How to

  1. 1.
    Create a class that implements IResultInterceptor
public class MyInterceptor : IResultInterceptor
{
public void Execute(string requestHandler, ref string json) // method from interface
{
// some code
}
}
  1. 1.
    Add instance using method Add in DocumentCollection<>
var myInterceptor = new MyInterceptor();
DocumentSearch<TechProduct> documentSearch; // From your DI provider
documentSearch
.Add(myInterceptor)
// ... Other settings
.Execute();
Last modified 5yr ago