Hi there, I am new to Typesense (using Cloud). I h...
# community-help
m
Hi there, I am new to Typesense (using Cloud). I have yet to find if there is a way to perform some sort of intersect - my data is recipes, and I want to be able to search only for recipes that contain ingredients found in another list I provide (the user's inventory).
Copy code
Example recipe:
{
  "document": {
    "AlcoholTotal": 20,
    "Allergens": [],
    "CaloriesTotal": 294,
    "Characteristics": [
      "Sour",
      "Strong",
      "Sweet"
    ],
    "Created Date": 1720422548037,
    "Ingredients No Garnish": [
      "1720048399592x884057907707967700",
      "1720048399641x263539933965021060",
      "1720048399848x743330650361028200",
      "1720048399877x364121743687373800",
      "1720048399884x140528244371890050",
      "1720048400131x417237709881521400",
      "1720048400133x890249800472356200",
      "1720165298033x127317636458741760"
    ],
    "Liquors": [
      "Bitters",
      "Whiskey",
      "Any"
    ],
    "Modified Date": 1724727173505,
    "Public": false,
    "Recipe-Type": "Cocktail",
    "Recipename": "Scotch & Coke",
    "Search Filters Text": "Angostura Bitters, Cola, Grenadine, Lime Juice, Mint Leaves (Spearmint), Simple Syrup, Soda Water, Islay Scotch Whiskey, Bitters, Whiskey, Scotch & Coke",
    "User": "1720420875828x566947982068003200",
    "id": "1720422546985x578124815327559700"
  },
  "highlight": {},
  "highlights": [],
  "text_match": 100,
  "text_match_info": {
    "best_field_score": "0",
    "best_field_weight": 12,
    "fields_matched": 4,
    "num_tokens_dropped": 1,
    "score": "100",
    "tokens_matched": 0,
    "typo_prefix_score": 255
  }
}
Copy code
Example Inventory:

{
  "document": {
    "BarName": "My Bar",
    "Ingredient Substitutes": [
      "1720048399905x833481427778472800",
      "1720048399592x884057907707967700",
      "1720048399897x552759951882978400",
      "1720048399850x540881717112198460",
      "1720048400131x417237709881521400",
      "1720048400157x799218488096275300",
      "1720048400156x845846313569515800",
      "1720048399887x828282648553764000",
      "1720159940402x253216057240584200",
      "1720168769946x531770555455242240",
      "1720048399596x635128701067747700",
      "1720048399597x121350170911201040",
      "1720048399865x308408348503629950",
      "1720048400115x552622919672182340",
      "1720162115706x299932122402783200",
      "1720048399840x575108098685618750",
      "1720048399652x638747138954753700",
      "1720170325349x159178211702603780",
      "1720116809763x597567235775529000",
      "1720048400134x215390770734101630",
      "1720048399614x307674166966945150",
      "1720155560092x714582974191370200",
      "1720048399599x408271292695957500",
      "1720048399649x214603830015576580",
      "1720048399647x908766300063325700",
      "1720048399882x331800450590745900",
      "1720048400116x503616014001418560",
      "1720048399841x358406973074916700",
      "1720652594346x658580746430316500",
      "1720048399640x723183697801198100",
      "1720048399655x343010666437975500",
      "1720048399875x749376760942728700",
      "1720048399589x615828636927313400",
      "1720048400120x378306399321292900",
      "1720167059428x917535160392482800",
      "1720048400151x989003085638696700",
      "1720122118388x376557362736267260",
      "1720048399830x626393210565070500",
      "1720048399854x276056920721463140",
      "1720048400122x993767335867266300",
      "1720048399638x783647394473256300",
      "1720048400128x550070380220596000",
      "1720165298033x127317636458741760",
      "1720048399611x662255980686372560",
      "1720048399659x735616784326180600",
      "1720244586701x664238757126602800",
      "1720048399622x653977941566695000",
      "1720048400137x824120284908934100",
      "1720048399853x133897270324998540",
      "1720048399873x439750605676564350",
      "1720170527848x101121130849107970",
      "1720048399879x805049870373966300",
      "1720048399894x993513564747828000",
      "1720048399871x136033638942448130",
      "1720048399849x528288409158304200",
      "1720160677927x470556036619567100",
      "1720137003950x969617378678145000",
      "1720048399868x542168646113617900",
      "1720048399877x364121743687373800",
      "1720048400114x372623488890454900",
      "1720048399843x763203030270044900",
      "1720048399892x185643634224440960",
      "1720048399654x882836096470082800",
      "1720048399641x263539933965021060",
      "1720048399834x550891762173715100",
      "1720048399836x826076470457354900",
      "1720048400119x412066948201306200",
      "1720048399612x641829557153463600",
      "1720048400140x906965805009964900",
      "1720048400158x520099230674108350",
      "1720048399560x342229250820237100",
      "1720048399628x877979721397347100",
      "1720156204016x459529206760996860",
      "1720164985799x263500558332592130",
      "1720156735900x127358360092672000",
      "1720048399643x445813719396819260",
      "1720048399616x675916228221291100",
      "1720048399890x518801264096883800",
      "1720048400155x555868640835087700",
      "1720048399559x652349270948360700",
      "1720048399645x618821213597837700",
      "1720048399650x334021654038091840",
      "1720048399609x228279805139770530",
      "1720048399658x240253404679354300",
      "1720048400149x904770962110584800",
      "1720147471294x703125486506344400",
      "1720122887320x544427701305344000",
      "1720048399881x441129003699801000",
      "1720048399630x975714302608399000",
      "1720048399826x424104745280384800",
      "1720048399828x864834499371323000",
      "1720048399603x331544127014401700",
      "1720048399886x516652358272761150",
      "1720048400127x600686069963839000",
      "1720048400150x158374054217818460",
      "1720048400160x881134592278412700",
      "1720048399623x337478051841982660",
      "1720119935952x228387753116827650",
      "1720048399848x743330650361028200"
    ],
 
    "User": "1683781539473x293055452614463500",
    "id": "1724736151598x616324667851337900"
  },
  "highlight": {},
  "highlights": [],
  "text_match": 100,
  "text_match_info": {
    "best_field_score": "0",
    "best_field_weight": 12,
    "fields_matched": 4,
    "num_tokens_dropped": 1,
    "score": "100",
    "tokens_matched": 0,
    "typo_prefix_score": 255
  }
}
j
m
Looking into these now…thanks!
👍 1