solr express
5.3.1
5.3.1
  • Introduction
  • About SOLR Express
    • Release notes
    • About
      • License
      • Packages
    • Benchmarks
      • Version 3.1.2
      • Version 5.0.0
    • Breaking changes
      • Version 5.0.0
  • Tutorials
    • Getting started
    • Basic Features
      • Queries
      • Fail fast
      • Global settings
      • Local parameter
    • Facets
      • Facet field
      • Facet query
      • Facet range
      • Facet spatial
      • Nested facet
    • Advanced Features
      • Authentication and Authorization
      • Dynamic field behaviour
      • Result interceptors
Powered by GitBook
On this page
  • Feature
  • How to

Was this helpful?

  1. Tutorials
  2. Advanced Features

Result interceptors

Feature

Intercept results of SOLR before parse in POCO

How to

  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. Add instance using method Add in DocumentCollection<>

    var myInterceptor = new MyInterceptor();

    DocumentSearch<TechProduct> documentSearch; // From your DI provider
    documentSearch
        .Add(myInterceptor)
        // ...  Other settings
        .Execute();
PreviousDynamic field behaviour

Last updated 6 years ago

Was this helpful?