Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9005029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:02:40+00:00 2026-06-16T01:02:40+00:00

I need a way to control building a facet without only using the nest

  • 0

I need a way to control building a facet without only using the nest fluent api. The main need is that I may need to include or exclude allterms or facetfilters.

The code below works but to change the facet, I would need to recompile. I see that it takes a Func but I have been unable to return the correct type to get this working.

        sd.FacetTerm("Name", t => t 
            .OnField("Field")
            .Size(facet.Size)
            .AllTerms()
        );

The code below doesn’t work and I’m sure why. When debugging, I see that it creates the facet term but without any of the data that “FacetBuilder” provided.

    sd.FacetTerm(facet.Name, t => FacetBuilder(options));


    public TermFacetDescriptor<CatalogMapping> FacetBuilder(FacetOptions options)
    {
        var facet = new TermFacetDescriptor<CatalogMapping>();
        facet.OnField(options.Field);

        facet.Size(options.Size);
        if (options.IncludeAllTerms)
            facet.AllTerms();

        return facet;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:02:42+00:00Added an answer on June 16, 2026 at 1:02 am

    Need to pass an object reference and modify that instance.

    public TermFacetDescriptor<CatalogMapping> FacetBuilder(TermFacetDescriptor<CatalogMapping> termFacet, FacetOptions options)
        {
            termFacet.OnField(options.Field);
            termFacet.Size(options.Size);
    
            if (options.IncludeAllTerms)
                termFacet.AllTerms();
    
            return termFacet;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an app that I'm building using the javascript API and have created
In my program I need a way to click on an Image control, the
I need a way to update tables on live machine without affecting users experience.
I'm building a custom control, and I need it to be able to respond
Background: I'm building a view-based NSTableView-esque control in Cocoa/Objective-C that offers the ease of
I'm building a custom data type using the user control wrappper method. Within it
Our company is building a Winforms application that needs a map control to help
I am building a breakout game using jQuery and the <canvas> element. To control
in an Iphone app, I am in need of building a page that scroll
I am building a custom control that looks like the one in the image

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.