<commit_before>### Data Sources Filtering

Data sources that return lists of resources support filtering semantics. 
To employ a filter include this block in your data source definition:

```
filter {
	name = ""
	values = [""]
}
```

The `name` value corresponds to the property name to filter with 
and the `values` lists can contain one or more values filter with. 

Multiple `values` work as an **OR** type filter. In the shape 
example below, the resulting data source would contain both VM 
shapes _Standard 1.1_ and _Standard 1.2_:
```
data "oci_core_shape" "t" {
  ...
  filter {
    name = "name"
    values = ["VM.Standard1.1", "VM.Standard1.2"]
  }
}
```

Multiple filters blocks can be composed to form **AND** type comparisons. The example below will return a data source containing 
_running instances_ in the _first AD_ of a region:
```
data "oci_core_instances" "s" {
	...
  filter {
    name = "availability_domain"
    values = ["\\w*-AD-1"]
    regex = true
  }

  filter {
    name = "state"
    values = ["RUNNING"]
  }
}
        
```

As shown above, filters can also employ regular expressions. By setting
`regex = true`, each item in the `values` list will be treated as a 
regular expression. Note that backslashes in strings for regular
expression special characters need to be escaped with another slash,
shown above as the first `\` before `\w` in `"\\w*-AD-1"`.

### Limitations
Currently filters can only target top level attributes of a 
resource (or top level arrays of strings). 

Drilling into properties of structured objects or lists of structured objects is not currently 
supported. If these properties are targeted no results will be returned from the datasource.<commit_msg>Updating filters documentation for nested structures and maps<commit_after>### Data Sources Filtering

Data sources that return lists of resources support filtering semantics. 
To employ a filter include this block in your data source definition:

```hcl
filter {
	name = ""
	values = [""]
}
```

The `name` value corresponds to the qualified property name to filter with
and the `values` lists can contain one or more values filter with.  

Nested Properties and map elements can be addressed by qualifying the property name with parent property name
Example r1 will give all the instances which have `source_type` image
Example r2 will give all the instances which contain a defined tag with value "42" for key `CostCenter` in the namespace `Operations`
```hcl
data "oci_core_instances" "r1" {
  ...
  filter {
    name = "source_details.source_type"
    value = ["image"]
  }
}

data "oci_core_instances" "r2" {
  ...
  filter {
    name = "defined_tags.Operations.CostCenter"
    value = ["42"]
  }
}

```

Multiple `values` work as an **OR** type filter. In the shape 
example below, the resulting data source would contain both VM 
shapes _Standard 1.1_ and _Standard 1.2_:
```hcl
data "oci_core_shape" "t" {
  ...
  filter {
    name = "name"
    values = ["VM.Standard1.1", "VM.Standard1.2"]
  }
}
```

Multiple filters blocks can be composed to form **AND** type comparisons. The example below will return a data source containing 
_running instances_ in the _first AD_ of a region:
```hcl
data "oci_core_instances" "s" {
	...
  filter {
    name = "availability_domain"
    values = ["\\w*-AD-1"]
    regex = true
  }

  filter {
    name = "state"
    values = ["RUNNING"]
  }
}
        
```

As shown above, filters can also employ regular expressions. By setting
`regex = true`, each item in the `values` list will be treated as a 
regular expression. Note that backslashes in strings for regular
expression special characters need to be escaped with another slash,
shown above as the first `\` before `\w` in `"\\w*-AD-1"`.

### Limitations
Drilling into lists of structured objects is not currently supported. If these properties are targeted no results will be returned from the datasource.
{'fraction_non_alphanumeric': 0.09134983414136259, 'fraction_numerical': 0.007144679765246236, 'mean_word_length': 3.6666666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2432964', 'n_tokens_mistral': 1138, 'n_tokens_neox': 1093, 'n_words': 515}