Skip to content
This repository was archived by the owner on Jun 1, 2024. It is now read-only.
This repository was archived by the owner on Jun 1, 2024. It is now read-only.

Examine Facets - Option OR / AND #11

@Sven883

Description

@Sven883

Hi @callumbwhyte ,

I've added the examine facets package to a new website for testing purposes.
My setup is the following:

  • Product page with a MNTP of type 'Filter' with propertyName 'productFiltersTaxonomy'
  • Pages without template (used as taxonomy) of type 'Filter'

In code i'm doing this:

var results = _productSearcher.CreateQuery(IndexTypes.Content, BooleanOperation.And)
                                  .Facet($"productFiltersTaxonomy_{_currentCulture}", convertedValue).MinHits(1)
                                  .And()
                                  .Field($"__Published_{_currentCulture}", "y")
                                  .And()
                                  .Field($"productGroupId", productGroupId.ToString())
                                  .Execute();

convertedValue could be 'filter1, filter2, ...' Right now my results show products that have atleast 1 of these filters added to the MNTP 'productFiltersTaxonomy' (OR function). I want to know if it's possible that atleast all filters need to be added to the MNTP (AND function).

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions