Skip to content

Commit

Permalink
Merge pull request #98 from k-yomo/add-virtual-index-resource
Browse files Browse the repository at this point in the history
Add virtual index resource
  • Loading branch information
k-yomo authored May 21, 2022
2 parents eba7cb8 + c64420c commit aef3657
Show file tree
Hide file tree
Showing 12 changed files with 1,957 additions and 196 deletions.
170 changes: 170 additions & 0 deletions docs/data-sources/virtual_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "algolia_virtual_index Data Source - terraform-provider-algolia"
subcategory: ""
description: |-
Data source for a virtual index.
---

# algolia_virtual_index (Data Source)

Data source for a virtual index.



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) Name of the index.

### Read-Only

- `advanced_config` (List of Object) The configuration for advanced features in index setting. (see [below for nested schema](#nestedatt--advanced_config))
- `attributes_config` (List of Object) The configuration for attributes. (see [below for nested schema](#nestedatt--attributes_config))
- `enable_personalization` (Boolean) Whether to enable the Personalization feature.
- `enable_rules` (Boolean) Whether Rules should be globally enabled.
- `faceting_config` (List of Object) The configuration for faceting. (see [below for nested schema](#nestedatt--faceting_config))
- `highlight_and_snippet_config` (List of Object) The configuration for highlight / snippet in index setting. (see [below for nested schema](#nestedatt--highlight_and_snippet_config))
- `id` (String) The ID of this resource.
- `languages_config` (List of Object) The configuration for languages in index setting. (see [below for nested schema](#nestedatt--languages_config))
- `pagination_config` (Block List) The configuration for pagination in index setting. (see [below for nested schema](#nestedblock--pagination_config))
- `performance_config` (List of Object) The configuration for performance in index setting. (see [below for nested schema](#nestedatt--performance_config))
- `query_strategy_config` (List of Object) The configuration for query strategy in index setting. (see [below for nested schema](#nestedatt--query_strategy_config))
- `ranking_config` (List of Object) The configuration for ranking. (see [below for nested schema](#nestedatt--ranking_config))
- `typos_config` (List of Object) The configuration for typos in index setting. (see [below for nested schema](#nestedatt--typos_config))

<a id="nestedatt--advanced_config"></a>
### Nested Schema for `advanced_config`

Read-Only:

- `attribute_criteria_computed_by_min_proximity` (Boolean)
- `attribute_for_distinct` (String)
- `distinct` (Number)
- `max_facet_hits` (Number)
- `min_proximity` (Number)
- `replace_synonyms_in_highlight` (Boolean)
- `response_fields` (Set of String)


<a id="nestedatt--attributes_config"></a>
### Nested Schema for `attributes_config`

Read-Only:

- `attributes_for_faceting` (Set of String)
- `attributes_to_retrieve` (Set of String)
- `searchable_attributes` (List of String)
- `unretrievable_attributes` (Set of String)


<a id="nestedatt--faceting_config"></a>
### Nested Schema for `faceting_config`

Read-Only:

- `max_values_per_facet` (Number)
- `sort_facet_values_by` (String)


<a id="nestedatt--highlight_and_snippet_config"></a>
### Nested Schema for `highlight_and_snippet_config`

Read-Only:

- `attributes_to_highlight` (Set of String)
- `attributes_to_snippet` (Set of String)
- `highlight_post_tag` (String)
- `highlight_pre_tag` (String)
- `restrict_highlight_and_snippet_arrays` (Boolean)
- `snippet_ellipsis_text` (String)


<a id="nestedatt--languages_config"></a>
### Nested Schema for `languages_config`

Read-Only:

- `attributes_to_transliterate` (Set of String)
- `camel_case_attributes` (Set of String)
- `custom_normalization` (Map of String)
- `decompound_query` (Boolean)
- `decompounded_attributes` (List of Object) (see [below for nested schema](#nestedobjatt--languages_config--decompounded_attributes))
- `ignore_plurals` (Boolean)
- `ignore_plurals_for` (Set of String)
- `index_languages` (Set of String)
- `keep_diacritics_on_characters` (String)
- `query_languages` (Set of String)
- `remove_stop_words` (Boolean)
- `remove_stop_words_for` (Set of String)

<a id="nestedobjatt--languages_config--decompounded_attributes"></a>
### Nested Schema for `languages_config.decompounded_attributes`

Read-Only:

- `attributes` (Set of String)
- `language` (String)



<a id="nestedblock--pagination_config"></a>
### Nested Schema for `pagination_config`

Read-Only:

- `hits_per_page` (Number) The number of hits per page.
- `pagination_limited_to` (Number) The maximum number of hits accessible via pagination


<a id="nestedatt--performance_config"></a>
### Nested Schema for `performance_config`

Read-Only:

- `allow_compression_of_integer_array` (Boolean)
- `numeric_attributes_for_filtering` (Set of String)


<a id="nestedatt--query_strategy_config"></a>
### Nested Schema for `query_strategy_config`

Read-Only:

- `advanced_syntax` (Boolean)
- `advanced_syntax_features` (Set of String)
- `alternatives_as_exact` (Set of String)
- `disable_exact_on_attributes` (Set of String)
- `disable_prefix_on_attributes` (Set of String)
- `exact_on_single_word_query` (String)
- `optional_words` (Set of String)
- `query_type` (String)
- `remove_words_if_no_results` (String)


<a id="nestedatt--ranking_config"></a>
### Nested Schema for `ranking_config`

Read-Only:

- `custom_ranking` (List of String)
- `ranking` (List of String)
- `relevancy_strictness` (Number)


<a id="nestedatt--typos_config"></a>
### Nested Schema for `typos_config`

Read-Only:

- `allow_typos_on_numeric_tokens` (Boolean)
- `disable_typo_tolerance_on_attributes` (List of String)
- `disable_typo_tolerance_on_words` (List of String)
- `min_word_size_for_1_typo` (Number)
- `min_word_size_for_2_typos` (Number)
- `separators_to_index` (String)
- `typo_tolerance` (String)


38 changes: 1 addition & 37 deletions docs/resources/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,6 @@ resource "algolia_index" "example" {
languages_config {
remove_stop_words_for = ["en"]
}
replicas = ["virtual(example_replica)"]
}
resource "algolia_index" "example_virtual_replica" {
name = "example_replica"
virtual = true
attributes_config {
unretrievable_attributes = [
"author_email"
]
attributes_to_retrieve = [
"title",
"category",
"tag",
"description",
"body"
]
}
ranking_config {
ranking = [
"proximity",
"words",
]
}
faceting_config {
max_values_per_facet = 50
sort_facet_values_by = "alpha"
}
languages_config {
remove_stop_words_for = ["en"]
}
}
```

Expand All @@ -113,7 +77,7 @@ resource "algolia_index" "example_virtual_replica" {
- `ranking_config` (Block List, Max: 1) The configuration for ranking. (see [below for nested schema](#nestedblock--ranking_config))
- `timeouts` (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
- `typos_config` (Block List, Max: 1) The configuration for typos in index setting. (see [below for nested schema](#nestedblock--typos_config))
- `virtual` (Boolean) Whether the index is virtual index. If true, applying the params listed in the [doc](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#unsupported-parameters) will be ignored.
- `virtual` (Boolean) **Deprecated:** Use `algolia_virtual_index` instead. Whether the index is virtual index. If true, applying the params listed in the [doc](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#unsupported-parameters) will be ignored.

### Read-Only

Expand Down
Loading

0 comments on commit aef3657

Please sign in to comment.