solr express
Search…
Result interceptors

Feature

Intercept results of SOLR before parse in POCO

How to

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