SearchField.java

  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License.
  3. //
  4. // Code generated by Microsoft (R) AutoRest Code Generator.
  5. // Changes may cause incorrect behavior and will be lost if the code is
  6. // regenerated.

  7. package com.azure.search.documents.indexes.models;

  8. import com.azure.core.annotation.Fluent;
  9. import com.fasterxml.jackson.annotation.JsonCreator;
  10. import com.fasterxml.jackson.annotation.JsonProperty;
  11. import com.fasterxml.jackson.annotation.JsonSetter;
  12. import java.util.List;

  13. /** Represents a field in an index definition, which describes the name, data type, and search behavior of a field. */
  14. @Fluent
  15. public final class SearchField {
  16.     /*
  17.      * The name of the field, which must be unique within the fields collection
  18.      * of the index or parent field.
  19.      */
  20.     @JsonProperty(value = "name", required = true)
  21.     private String name;

  22.     /*
  23.      * The data type of the field.
  24.      */
  25.     @JsonProperty(value = "type", required = true)
  26.     private SearchFieldDataType type;

  27.     /*
  28.      * A value indicating whether the field uniquely identifies documents in
  29.      * the index. Exactly one top-level field in each index must be chosen as
  30.      * the key field and it must be of type Edm.String. Key fields can be used
  31.      * to look up documents directly and update or delete specific documents.
  32.      * Default is false for simple fields and null for complex fields.
  33.      */
  34.     @JsonProperty(value = "key")
  35.     private Boolean key;

  36.     /*
  37.      * A value indicating whether the field will be returned in a search
  38.      * result. This property must be false for key fields, and must be null for
  39.      * complex fields. You can hide a field from search results if you want to
  40.      * use it only as a filter, for sorting, or for scoring. This property can
  41.      * also be changed on existing fields and enabling it does not cause an
  42.      * increase in index storage requirements.
  43.      */
  44.     @JsonProperty(value = "retrievable")
  45.     private Boolean hidden;

  46.     /*
  47.      * A value indicating whether the field is full-text searchable. This means
  48.      * it will undergo analysis such as word-breaking during indexing. If you
  49.      * set a searchable field to a value like "sunny day", internally it will
  50.      * be split into the individual tokens "sunny" and "day". This enables
  51.      * full-text searches for these terms. Fields of type Edm.String or
  52.      * Collection(Edm.String) are searchable by default. This property must be
  53.      * false for simple fields of other non-string data types, and it must be
  54.      * null for complex fields. Note: searchable fields consume extra space in
  55.      * your index since Azure Cognitive Search will store an additional
  56.      * tokenized version of the field value for full-text searches. If you want
  57.      * to save space in your index and you don't need a field to be included in
  58.      * searches, set searchable to false.
  59.      */
  60.     @JsonProperty(value = "searchable")
  61.     private Boolean searchable;

  62.     /*
  63.      * A value indicating whether to enable the field to be referenced in
  64.      * $filter queries. filterable differs from searchable in how strings are
  65.      * handled. Fields of type Edm.String or Collection(Edm.String) that are
  66.      * filterable do not undergo word-breaking, so comparisons are for exact
  67.      * matches only. For example, if you set such a field f to "sunny day",
  68.      * $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day'
  69.      * will. This property must be null for complex fields. Default is true for
  70.      * simple fields and null for complex fields.
  71.      */
  72.     @JsonProperty(value = "filterable")
  73.     private Boolean filterable;

  74.     /*
  75.      * A value indicating whether to enable the field to be referenced in
  76.      * $orderby expressions. By default Azure Cognitive Search sorts results by
  77.      * score, but in many experiences users will want to sort by fields in the
  78.      * documents. A simple field can be sortable only if it is single-valued
  79.      * (it has a single value in the scope of the parent document). Simple
  80.      * collection fields cannot be sortable, since they are multi-valued.
  81.      * Simple sub-fields of complex collections are also multi-valued, and
  82.      * therefore cannot be sortable. This is true whether it's an immediate
  83.      * parent field, or an ancestor field, that's the complex collection.
  84.      * Complex fields cannot be sortable and the sortable property must be null
  85.      * for such fields. The default for sortable is true for single-valued
  86.      * simple fields, false for multi-valued simple fields, and null for
  87.      * complex fields.
  88.      */
  89.     @JsonProperty(value = "sortable")
  90.     private Boolean sortable;

  91.     /*
  92.      * A value indicating whether to enable the field to be referenced in facet
  93.      * queries. Typically used in a presentation of search results that
  94.      * includes hit count by category (for example, search for digital cameras
  95.      * and see hits by brand, by megapixels, by price, and so on). This
  96.      * property must be null for complex fields. Fields of type
  97.      * Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be
  98.      * facetable. Default is true for all other simple fields.
  99.      */
  100.     @JsonProperty(value = "facetable")
  101.     private Boolean facetable;

  102.     /*
  103.      * The name of the analyzer to use for the field. This option can be used
  104.      * only with searchable fields and it can't be set together with either
  105.      * searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot
  106.      * be changed for the field. Must be null for complex fields.
  107.      */
  108.     @JsonProperty(value = "analyzer")
  109.     private LexicalAnalyzerName analyzerName;

  110.     /*
  111.      * The name of the analyzer used at search time for the field. This option
  112.      * can be used only with searchable fields. It must be set together with
  113.      * indexAnalyzer and it cannot be set together with the analyzer option.
  114.      * This property cannot be set to the name of a language analyzer; use the
  115.      * analyzer property instead if you need a language analyzer. This analyzer
  116.      * can be updated on an existing field. Must be null for complex fields.
  117.      */
  118.     @JsonProperty(value = "searchAnalyzer")
  119.     private LexicalAnalyzerName searchAnalyzerName;

  120.     /*
  121.      * The name of the analyzer used at indexing time for the field. This
  122.      * option can be used only with searchable fields. It must be set together
  123.      * with searchAnalyzer and it cannot be set together with the analyzer
  124.      * option.  This property cannot be set to the name of a language analyzer;
  125.      * use the analyzer property instead if you need a language analyzer. Once
  126.      * the analyzer is chosen, it cannot be changed for the field. Must be null
  127.      * for complex fields.
  128.      */
  129.     @JsonProperty(value = "indexAnalyzer")
  130.     private LexicalAnalyzerName indexAnalyzerName;

  131.     /*
  132.      * The name of the normalizer to use for the field. This option can be used
  133.      * only with fields with filterable, sortable, or facetable enabled. Once
  134.      * the normalizer is chosen, it cannot be changed for the field. Must be
  135.      * null for complex fields.
  136.      */
  137.     @JsonProperty(value = "normalizer")
  138.     private LexicalNormalizerName normalizerName;

  139.     /*
  140.      * A list of the names of synonym maps to associate with this field. This
  141.      * option can be used only with searchable fields. Currently only one
  142.      * synonym map per field is supported. Assigning a synonym map to a field
  143.      * ensures that query terms targeting that field are expanded at query-time
  144.      * using the rules in the synonym map. This attribute can be changed on
  145.      * existing fields. Must be null or an empty collection for complex fields.
  146.      */
  147.     @JsonProperty(value = "synonymMaps")
  148.     private List<String> synonymMapNames;

  149.     /*
  150.      * A list of sub-fields if this is a field of type Edm.ComplexType or
  151.      * Collection(Edm.ComplexType). Must be null or empty for simple fields.
  152.      */
  153.     @JsonProperty(value = "fields")
  154.     private List<SearchField> fields;

  155.     /**
  156.      * Creates an instance of SearchField class.
  157.      *
  158.      * @param name the name value to set.
  159.      * @param type the type value to set.
  160.      */
  161.     @JsonCreator
  162.     public SearchField(
  163.             @JsonProperty(value = "name", required = true) String name,
  164.             @JsonProperty(value = "type", required = true) SearchFieldDataType type) {
  165.         this.name = name;
  166.         this.type = type;
  167.     }

  168.     /**
  169.      * Get the name property: The name of the field, which must be unique within the fields collection of the index or
  170.      * parent field.
  171.      *
  172.      * @return the name value.
  173.      */
  174.     public String getName() {
  175.         return this.name;
  176.     }

  177.     /**
  178.      * Get the type property: The data type of the field.
  179.      *
  180.      * @return the type value.
  181.      */
  182.     public SearchFieldDataType getType() {
  183.         return this.type;
  184.     }

  185.     /**
  186.      * Get the key property: A value indicating whether the field uniquely identifies documents in the index. Exactly
  187.      * one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields
  188.      * can be used to look up documents directly and update or delete specific documents. Default is false for simple
  189.      * fields and null for complex fields.
  190.      *
  191.      * @return the key value.
  192.      */
  193.     public Boolean isKey() {
  194.         return this.key;
  195.     }

  196.     /**
  197.      * Set the key property: A value indicating whether the field uniquely identifies documents in the index. Exactly
  198.      * one top-level field in each index must be chosen as the key field and it must be of type Edm.String. Key fields
  199.      * can be used to look up documents directly and update or delete specific documents. Default is false for simple
  200.      * fields and null for complex fields.
  201.      *
  202.      * @param key the key value to set.
  203.      * @return the SearchField object itself.
  204.      */
  205.     public SearchField setKey(Boolean key) {
  206.         this.key = key;
  207.         return this;
  208.     }

  209.     /**
  210.      * Get the hidden property: A value indicating whether the field will be returned in a search result. This property
  211.      * must be false for key fields, and must be null for complex fields. You can hide a field from search results if
  212.      * you want to use it only as a filter, for sorting, or for scoring. This property can also be changed on existing
  213.      * fields and enabling it does not cause an increase in index storage requirements.
  214.      *
  215.      * @return the hidden value.
  216.      */
  217.     public Boolean isHidden() {
  218.         return (this.hidden == null) ? null : !this.hidden;
  219.     }

  220.     /**
  221.      * Set the hidden property: A value indicating whether the field will be returned in a search result. This property
  222.      * must be false for key fields, and must be null for complex fields. You can hide a field from search results if
  223.      * you want to use it only as a filter, for sorting, or for scoring. This property can also be changed on existing
  224.      * fields and enabling it does not cause an increase in index storage requirements.
  225.      *
  226.      * @param hidden the hidden value to set.
  227.      * @return the SearchField object itself.
  228.      */
  229.     public SearchField setHidden(Boolean hidden) {
  230.         this.hidden = (hidden == null) ? null : !hidden;
  231.         return this;
  232.     }

  233.     /**
  234.      * Get the searchable property: A value indicating whether the field is full-text searchable. This means it will
  235.      * undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like "sunny
  236.      * day", internally it will be split into the individual tokens "sunny" and "day". This enables full-text searches
  237.      * for these terms. Fields of type Edm.String or Collection(Edm.String) are searchable by default. This property
  238.      * must be false for simple fields of other non-string data types, and it must be null for complex fields. Note:
  239.      * searchable fields consume extra space in your index since Azure Cognitive Search will store an additional
  240.      * tokenized version of the field value for full-text searches. If you want to save space in your index and you
  241.      * don't need a field to be included in searches, set searchable to false.
  242.      *
  243.      * @return the searchable value.
  244.      */
  245.     public Boolean isSearchable() {
  246.         return this.searchable;
  247.     }

  248.     /**
  249.      * Set the searchable property: A value indicating whether the field is full-text searchable. This means it will
  250.      * undergo analysis such as word-breaking during indexing. If you set a searchable field to a value like "sunny
  251.      * day", internally it will be split into the individual tokens "sunny" and "day". This enables full-text searches
  252.      * for these terms. Fields of type Edm.String or Collection(Edm.String) are searchable by default. This property
  253.      * must be false for simple fields of other non-string data types, and it must be null for complex fields. Note:
  254.      * searchable fields consume extra space in your index since Azure Cognitive Search will store an additional
  255.      * tokenized version of the field value for full-text searches. If you want to save space in your index and you
  256.      * don't need a field to be included in searches, set searchable to false.
  257.      *
  258.      * @param searchable the searchable value to set.
  259.      * @return the SearchField object itself.
  260.      */
  261.     public SearchField setSearchable(Boolean searchable) {
  262.         this.searchable = searchable;
  263.         return this;
  264.     }

  265.     /**
  266.      * Get the filterable property: A value indicating whether to enable the field to be referenced in $filter queries.
  267.      * filterable differs from searchable in how strings are handled. Fields of type Edm.String or
  268.      * Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches
  269.      * only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but
  270.      * $filter=f eq 'sunny day' will. This property must be null for complex fields. Default is true for simple fields
  271.      * and null for complex fields.
  272.      *
  273.      * @return the filterable value.
  274.      */
  275.     public Boolean isFilterable() {
  276.         return this.filterable;
  277.     }

  278.     /**
  279.      * Set the filterable property: A value indicating whether to enable the field to be referenced in $filter queries.
  280.      * filterable differs from searchable in how strings are handled. Fields of type Edm.String or
  281.      * Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches
  282.      * only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but
  283.      * $filter=f eq 'sunny day' will. This property must be null for complex fields. Default is true for simple fields
  284.      * and null for complex fields.
  285.      *
  286.      * @param filterable the filterable value to set.
  287.      * @return the SearchField object itself.
  288.      */
  289.     public SearchField setFilterable(Boolean filterable) {
  290.         this.filterable = filterable;
  291.         return this;
  292.     }

  293.     /**
  294.      * Get the sortable property: A value indicating whether to enable the field to be referenced in $orderby
  295.      * expressions. By default Azure Cognitive Search sorts results by score, but in many experiences users will want to
  296.      * sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single
  297.      * value in the scope of the parent document). Simple collection fields cannot be sortable, since they are
  298.      * multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable.
  299.      * This is true whether it's an immediate parent field, or an ancestor field, that's the complex collection. Complex
  300.      * fields cannot be sortable and the sortable property must be null for such fields. The default for sortable is
  301.      * true for single-valued simple fields, false for multi-valued simple fields, and null for complex fields.
  302.      *
  303.      * @return the sortable value.
  304.      */
  305.     public Boolean isSortable() {
  306.         return this.sortable;
  307.     }

  308.     /**
  309.      * Set the sortable property: A value indicating whether to enable the field to be referenced in $orderby
  310.      * expressions. By default Azure Cognitive Search sorts results by score, but in many experiences users will want to
  311.      * sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single
  312.      * value in the scope of the parent document). Simple collection fields cannot be sortable, since they are
  313.      * multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable.
  314.      * This is true whether it's an immediate parent field, or an ancestor field, that's the complex collection. Complex
  315.      * fields cannot be sortable and the sortable property must be null for such fields. The default for sortable is
  316.      * true for single-valued simple fields, false for multi-valued simple fields, and null for complex fields.
  317.      *
  318.      * @param sortable the sortable value to set.
  319.      * @return the SearchField object itself.
  320.      */
  321.     public SearchField setSortable(Boolean sortable) {
  322.         this.sortable = sortable;
  323.         return this;
  324.     }

  325.     /**
  326.      * Get the facetable property: A value indicating whether to enable the field to be referenced in facet queries.
  327.      * Typically used in a presentation of search results that includes hit count by category (for example, search for
  328.      * digital cameras and see hits by brand, by megapixels, by price, and so on). This property must be null for
  329.      * complex fields. Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default
  330.      * is true for all other simple fields.
  331.      *
  332.      * @return the facetable value.
  333.      */
  334.     public Boolean isFacetable() {
  335.         return this.facetable;
  336.     }

  337.     /**
  338.      * Set the facetable property: A value indicating whether to enable the field to be referenced in facet queries.
  339.      * Typically used in a presentation of search results that includes hit count by category (for example, search for
  340.      * digital cameras and see hits by brand, by megapixels, by price, and so on). This property must be null for
  341.      * complex fields. Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default
  342.      * is true for all other simple fields.
  343.      *
  344.      * @param facetable the facetable value to set.
  345.      * @return the SearchField object itself.
  346.      */
  347.     public SearchField setFacetable(Boolean facetable) {
  348.         this.facetable = facetable;
  349.         return this;
  350.     }

  351.     /**
  352.      * Get the analyzerName property: The name of the analyzer to use for the field. This option can be used only with
  353.      * searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is
  354.      * chosen, it cannot be changed for the field. Must be null for complex fields.
  355.      *
  356.      * @return the analyzerName value.
  357.      */
  358.     public LexicalAnalyzerName getAnalyzerName() {
  359.         return this.analyzerName;
  360.     }

  361.     /**
  362.      * Set the analyzerName property: The name of the analyzer to use for the field. This option can be used only with
  363.      * searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is
  364.      * chosen, it cannot be changed for the field. Must be null for complex fields.
  365.      *
  366.      * @param analyzerName the analyzerName value to set.
  367.      * @return the SearchField object itself.
  368.      */
  369.     public SearchField setAnalyzerName(LexicalAnalyzerName analyzerName) {
  370.         this.analyzerName = analyzerName;
  371.         return this;
  372.     }

  373.     /**
  374.      * Get the searchAnalyzerName property: The name of the analyzer used at search time for the field. This option can
  375.      * be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together
  376.      * with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer
  377.      * property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null
  378.      * for complex fields.
  379.      *
  380.      * @return the searchAnalyzerName value.
  381.      */
  382.     public LexicalAnalyzerName getSearchAnalyzerName() {
  383.         return this.searchAnalyzerName;
  384.     }

  385.     /**
  386.      * Set the searchAnalyzerName property: The name of the analyzer used at search time for the field. This option can
  387.      * be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together
  388.      * with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer
  389.      * property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null
  390.      * for complex fields.
  391.      *
  392.      * @param searchAnalyzerName the searchAnalyzerName value to set.
  393.      * @return the SearchField object itself.
  394.      */
  395.     public SearchField setSearchAnalyzerName(LexicalAnalyzerName searchAnalyzerName) {
  396.         this.searchAnalyzerName = searchAnalyzerName;
  397.         return this;
  398.     }

  399.     /**
  400.      * Get the indexAnalyzerName property: The name of the analyzer used at indexing time for the field. This option can
  401.      * be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together
  402.      * with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer
  403.      * property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the
  404.      * field. Must be null for complex fields.
  405.      *
  406.      * @return the indexAnalyzerName value.
  407.      */
  408.     public LexicalAnalyzerName getIndexAnalyzerName() {
  409.         return this.indexAnalyzerName;
  410.     }

  411.     /**
  412.      * Set the indexAnalyzerName property: The name of the analyzer used at indexing time for the field. This option can
  413.      * be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together
  414.      * with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer
  415.      * property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the
  416.      * field. Must be null for complex fields.
  417.      *
  418.      * @param indexAnalyzerName the indexAnalyzerName value to set.
  419.      * @return the SearchField object itself.
  420.      */
  421.     public SearchField setIndexAnalyzerName(LexicalAnalyzerName indexAnalyzerName) {
  422.         this.indexAnalyzerName = indexAnalyzerName;
  423.         return this;
  424.     }

  425.     /**
  426.      * Get the normalizerName property: The name of the normalizer to use for the field. This option can be used only
  427.      * with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it cannot be changed
  428.      * for the field. Must be null for complex fields.
  429.      *
  430.      * @return the normalizerName value.
  431.      */
  432.     public LexicalNormalizerName getNormalizerName() {
  433.         return this.normalizerName;
  434.     }

  435.     /**
  436.      * Set the normalizerName property: The name of the normalizer to use for the field. This option can be used only
  437.      * with fields with filterable, sortable, or facetable enabled. Once the normalizer is chosen, it cannot be changed
  438.      * for the field. Must be null for complex fields.
  439.      *
  440.      * @param normalizerName the normalizerName value to set.
  441.      * @return the SearchField object itself.
  442.      */
  443.     public SearchField setNormalizerName(LexicalNormalizerName normalizerName) {
  444.         this.normalizerName = normalizerName;
  445.         return this;
  446.     }

  447.     /**
  448.      * Get the synonymMapNames property: A list of the names of synonym maps to associate with this field. This option
  449.      * can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a
  450.      * synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules
  451.      * in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for
  452.      * complex fields.
  453.      *
  454.      * @return the synonymMapNames value.
  455.      */
  456.     public List<String> getSynonymMapNames() {
  457.         return this.synonymMapNames;
  458.     }

  459.     /**
  460.      * Set the synonymMapNames property: A list of the names of synonym maps to associate with this field. This option
  461.      * can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a
  462.      * synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules
  463.      * in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for
  464.      * complex fields.
  465.      *
  466.      * @param synonymMapNames the synonymMapNames value to set.
  467.      * @return the SearchField object itself.
  468.      */
  469.     @JsonSetter
  470.     public SearchField setSynonymMapNames(List<String> synonymMapNames) {
  471.         this.synonymMapNames = synonymMapNames;
  472.         return this;
  473.     }

  474.     /**
  475.      * Get the fields property: A list of sub-fields if this is a field of type Edm.ComplexType or
  476.      * Collection(Edm.ComplexType). Must be null or empty for simple fields.
  477.      *
  478.      * @return the fields value.
  479.      */
  480.     public List<SearchField> getFields() {
  481.         return this.fields;
  482.     }

  483.     /**
  484.      * Set the fields property: A list of sub-fields if this is a field of type Edm.ComplexType or
  485.      * Collection(Edm.ComplexType). Must be null or empty for simple fields.
  486.      *
  487.      * @param fields the fields value to set.
  488.      * @return the SearchField object itself.
  489.      */
  490.     @JsonSetter
  491.     public SearchField setFields(List<SearchField> fields) {
  492.         this.fields = fields;
  493.         return this;
  494.     }

  495.     /**
  496.      * Set the fields property: A list of sub-fields if this is a field of type Edm.ComplexType or
  497.      * Collection(Edm.ComplexType). Must be null or empty for simple fields.
  498.      *
  499.      * @param fields the fields value to set.
  500.      * @return the SearchField object itself.
  501.      */
  502.     public SearchField setFields(SearchField... fields) {
  503.         this.fields = (fields == null) ? null : java.util.Arrays.asList(fields);
  504.         return this;
  505.     }

  506.     /**
  507.      * Set the synonymMapNames property: A list of the names of synonym maps to associate with this field. This option
  508.      * can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a
  509.      * synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules
  510.      * in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for
  511.      * complex fields.
  512.      *
  513.      * @param synonymMapNames the synonymMapNames value to set.
  514.      * @return the SearchField object itself.
  515.      */
  516.     public SearchField setSynonymMapNames(String... synonymMapNames) {
  517.         this.synonymMapNames = (synonymMapNames == null) ? null : java.util.Arrays.asList(synonymMapNames);
  518.         return this;
  519.     }
  520. }