So in Solr I have a data structure that is made of of Restaurant Documents
that have Deals attached as _childDocuments to a Restaurant. However with my
current query

{!parent which='content_type:restaurant'}_text_=kids
&fl=*,[child parentFilter=content_type:restaurant
childFilter="content_type:deal AND day:Monday" limit=3]

I will receive the response below but I want to exclude the bottom
restaurant Bob Evans because I want to exclude any restaurant that has no
child documents(deals) attached. Any help on this query will be greatly
appreciated.




{
  id: "restaurant_7",
  content_type: "restaurant",
  deal_image: [
    "/storage/restaurants/images/BoneFire Smokehouse/BoneFire
Smokehousedeal_image.png"
  ],
  name: [
    "BoneFire Smokehouse"
  ],
  cuisine: [
    " BBQ"
  ],
  description: [
    "In 2009, The Bone Fire Smokehouse was originally located in Kingsport,
Tennessee. In 2012, sensing a real renaissance of economic and musical
growth, this popular eatery and entertainment venue was moved to historic
downtown Abingdon. The new Smokehouse opened in the former Withers Hardware
Store building, and a new better Bone Fire Smokehouse came to life in
another vintage location. They have become a popular choice for both
residents and tourists, serving as an integral part of the growing Abingdon
Dining and Musical Renaissance for the last five years."
  ],
  phone: [
    42389589166
  ],
  city: "Abingdon",
  state: "Virginia",
  zip: 24210,
  country: "United States",
  full_address: [
    "260 W Main St, Abingdon, VA 24210, USA"
  ],
  latlon: "36.7089569,-81.9791766",
  _version_: 1642803109735432200,
  _childDocuments_: [
    {
      id: "restaurant_7_deal_149",
      deal: "Free Kid's Meal with Purchase of Adult Meal",
      deal_type: "Kids",
      content_type: "deal",
      day: "Monday",
      _version_: 1642803109735432200
    }
  ]
},
{
  id: "restaurant_5",
  content_type: "restaurant",
  deal_image: [
   
"/Applications/MAMP/htdocs/dailyeatz/storage/app/public/restaurants/images/Bob
Evans/Bob Evansdeal_image.png"
  ],
  name: [
    "Bob Evans"
  ],
  cuisine: [
    " American"
  ],
  description: [
    "Our success is built on the basics: high-quality food and heartfelt
hospitality. In the words of our founder, Everybody is somebody at Bob
Evans. We invite you to join us for a meal as we bring the values of the
farm to the table by providing, flavorful meals at our place or yours."
  ],
  phone: [
    42389589166
  ],
  city: "Johnson City",
  state: "Tennessee",
  zip: 37615,
  country: "United States",
  full_address: [
    "2801 Boones Creek Rd, Johnson City, TN 37615, USA"
  ],
  latlon: "36.3802985,-82.4254633",
  _version_: 1642803106647376000
}



--
Sent from: https://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to