How to Match specific Variation Combinations

I have an ecommerce solution for classes that we are using Appsearch. We are indexing Parent classes with Child class attributes for specific sections

for example:
Class ABC
Section 1, Jan 1 @ 8am
Section 2, Jan 15 @ 10am
Section 3, Feb 1 @ 2pm

We're indexing:
Title: Class ABC
StartDates array [jan 1, jan 15, feb 1]
StartTimes array [8am, 10am, 2pm]

We now need to be able to filter results for a starting date rate, AND a Starting time range and retrieve the appropriate results.

Example:

  1. StartDates between Jan 15 and Feb 15 AND StartTimes between 8am and 11am. It should return the above parent in the results because Jan 15 starts at 10am.
  2. StartDates between Jan 15 and Feb 15 AND StartTimes between 8am and 9am. No results should be returned because both constraints can't be satisfied.

Can that be accomplished in Appsearch? We are having trouble getting that request to work.

Elasticsearch supports "Nested object" and/or "join" features to support this requirement ... are those in Appsearch?

Hey @Kurt_Sahlin,

I have not found a great way to accomplish this in App Search.

App Search has no support for nested documents which makes it really hard.

Instead of indexing documents at a Class level, you'd almost need to index them at a "Section" level.

Section 1
startDate: Jan 1
startTime: 8am
class: ABC

Section 2
startDate: Jan 5
startTime: 10am
class: ABC

Section 3
startDate: Feb 1
startTime: 2pm
class: ABC

I realize that's probably not what you're looking for though.

Thanks for the update. Yes, we're going to have to look at doing a 2nd query into a section by section index.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.