solr express
5.4.2
5.4.2
  • 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
  • Option 1
  • Option 2

Was this helpful?

  1. Tutorials
  2. Basic Features

Local parameter

PreviousGlobal settingsNextFacets

Last updated 6 years ago

Was this helpful?

Feature

Create a local parameter

How to

Option 1

Using query (see how create queries in )

    DocumentCollection<TechProductDocument> documentCollection; // from DI

    var rersult = documentCollection
        .Select()
        .LocalParameter("MyLocalParameter", q => q.Categories, query => query.EqualsTo("some category"))
        .Execute();

Option 2

Using plain value

    DocumentCollection<TechProductDocument> documentCollection; // from DI

    var rersult = documentCollection
        .Select()
        .LocalParameter("MyLocalParameter", "some value")
        .Execute();
tutorial