Skip to content

Latest commit

 

History

History
104 lines (94 loc) · 2.17 KB

example.md

File metadata and controls

104 lines (94 loc) · 2.17 KB

Here is an example of non-JSON stuff.

{
  "domain": "Online Retail",
  "mapping": {
    "properties": {
      "product_id": { "type": "keyword", "description": "Unique identifier for each product." },
      "name": { "type": "text", "description": "Name of the product." }
    },
    "_meta": "This mapping allows for filtering products by name, availability, and categories in search queries." 
  }
}

Here is another example of non-JSON stuff.

Now we have some more JSON, but invalid...

{
  "NLQs": 
    {
      "NLQ": "What products are available?",
      "query": {
        "match_all": {}
      }
    },
    {
      "NLQ": "Show me all products with 'apple' in the name.",
      "query": {
        "match": {
          "name": "apple"
        }
      }
    }
  ]
}

And finally, here is a valid JSON block.

{
"domain": "Online Retail",
"mapping": {
    "properties": {
    "product_id": { "type": "keyword", "description": "Unique identifier for each product." },
    "name": { "type": "text", "description": "Name of the product." }
    },
    "_meta": "This mapping allows for filtering products by name, availability, and categories in search queries." 
},
"NLQs": [
    {
    "NLQ": "What products are available?",
    "query": {
        "match_all": {}
    }
    },
    {
    "NLQ": "Show me all products with 'apple' in the name.",
    "query": {
        "match": {
        "name": "apple"
        }
    }
    }
]
}

Oh, and here is another example of non-JSON stuff. And here is JSON. It's valid again:

{
  "domain": "Online Retail #2",
  "mapping": {
    "properties": {
      "product_id": { "type": "keyword", "description": "Unique identifier for each product." },
      "name": { "type": "text", "description": "Name of the product." }
    },
    "_meta": "This mapping allows for filtering products by name, availability, and categories in search queries." 
  },
  "NLQs": [
    {
      "NLQ": "What products are available?",
      "query": {
        "match_all": {}
      }
    },
    {
      "NLQ": "Show me all products with 'apple' in the name.",
      "query": {
        "match": {
          "name": "apple"
        }
      }
    }
  ]
}