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

Examine Facets - Option OR / AND #11

Open
Sven883 opened this issue Aug 31, 2021 · 0 comments
Open

Examine Facets - Option OR / AND #11

Sven883 opened this issue Aug 31, 2021 · 0 comments

Comments

@Sven883
Copy link

Sven883 commented Aug 31, 2021

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant