PrioritizedFields.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.JsonProperty;
  10. import java.util.List;

  11. /**
  12.  * Describes the title, content, and keywords fields to be used for semantic ranking, captions, highlights, and answers.
  13.  */
  14. @Fluent
  15. public final class PrioritizedFields {
  16.     /*
  17.      * Defines the title field to be used for semantic ranking, captions,
  18.      * highlights, and answers. If you don't have a title field in your index,
  19.      * leave this blank.
  20.      */
  21.     @JsonProperty(value = "titleField")
  22.     private SemanticField titleField;

  23.     /*
  24.      * Defines the content fields to be used for semantic ranking, captions,
  25.      * highlights, and answers. For the best result, the selected fields should
  26.      * contain text in natural language form. The order of the fields in the
  27.      * array represents their priority. Fields with lower priority may get
  28.      * truncated if the content is long.
  29.      */
  30.     @JsonProperty(value = "prioritizedContentFields")
  31.     private List<SemanticField> prioritizedContentFields;

  32.     /*
  33.      * Defines the keyword fields to be used for semantic ranking, captions,
  34.      * highlights, and answers. For the best result, the selected fields should
  35.      * contain a list of keywords. The order of the fields in the array
  36.      * represents their priority. Fields with lower priority may get truncated
  37.      * if the content is long.
  38.      */
  39.     @JsonProperty(value = "prioritizedKeywordsFields")
  40.     private List<SemanticField> prioritizedKeywordsFields;

  41.     /**
  42.      * Get the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and
  43.      * answers. If you don't have a title field in your index, leave this blank.
  44.      *
  45.      * @return the titleField value.
  46.      */
  47.     public SemanticField getTitleField() {
  48.         return this.titleField;
  49.     }

  50.     /**
  51.      * Set the titleField property: Defines the title field to be used for semantic ranking, captions, highlights, and
  52.      * answers. If you don't have a title field in your index, leave this blank.
  53.      *
  54.      * @param titleField the titleField value to set.
  55.      * @return the PrioritizedFields object itself.
  56.      */
  57.     public PrioritizedFields setTitleField(SemanticField titleField) {
  58.         this.titleField = titleField;
  59.         return this;
  60.     }

  61.     /**
  62.      * Get the prioritizedContentFields property: Defines the content fields to be used for semantic ranking, captions,
  63.      * highlights, and answers. For the best result, the selected fields should contain text in natural language form.
  64.      * The order of the fields in the array represents their priority. Fields with lower priority may get truncated if
  65.      * the content is long.
  66.      *
  67.      * @return the prioritizedContentFields value.
  68.      */
  69.     public List<SemanticField> getPrioritizedContentFields() {
  70.         return this.prioritizedContentFields;
  71.     }

  72.     /**
  73.      * Set the prioritizedContentFields property: Defines the content fields to be used for semantic ranking, captions,
  74.      * highlights, and answers. For the best result, the selected fields should contain text in natural language form.
  75.      * The order of the fields in the array represents their priority. Fields with lower priority may get truncated if
  76.      * the content is long.
  77.      *
  78.      * @param prioritizedContentFields the prioritizedContentFields value to set.
  79.      * @return the PrioritizedFields object itself.
  80.      */
  81.     public PrioritizedFields setPrioritizedContentFields(List<SemanticField> prioritizedContentFields) {
  82.         this.prioritizedContentFields = prioritizedContentFields;
  83.         return this;
  84.     }

  85.     /**
  86.      * Get the prioritizedKeywordsFields property: Defines the keyword fields to be used for semantic ranking, captions,
  87.      * highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of
  88.      * the fields in the array represents their priority. Fields with lower priority may get truncated if the content is
  89.      * long.
  90.      *
  91.      * @return the prioritizedKeywordsFields value.
  92.      */
  93.     public List<SemanticField> getPrioritizedKeywordsFields() {
  94.         return this.prioritizedKeywordsFields;
  95.     }

  96.     /**
  97.      * Set the prioritizedKeywordsFields property: Defines the keyword fields to be used for semantic ranking, captions,
  98.      * highlights, and answers. For the best result, the selected fields should contain a list of keywords. The order of
  99.      * the fields in the array represents their priority. Fields with lower priority may get truncated if the content is
  100.      * long.
  101.      *
  102.      * @param prioritizedKeywordsFields the prioritizedKeywordsFields value to set.
  103.      * @return the PrioritizedFields object itself.
  104.      */
  105.     public PrioritizedFields setPrioritizedKeywordsFields(List<SemanticField> prioritizedKeywordsFields) {
  106.         this.prioritizedKeywordsFields = prioritizedKeywordsFields;
  107.         return this;
  108.     }
  109. }