/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.kendra.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about a document attribute. You can use document attributes as facets. *
** For example, the document attribute or facet "Department" includes the values "HR", "Engineering", and "Accounting". * You can display these values in the search results so that documents can be searched by department. *
** You can display up to 10 facet values per facet for a query. If you want to increase this limit, contact Support. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Facet implements Serializable, Cloneable, StructuredPojo { /** ** The unique key for the document attribute. *
*/ private String documentAttributeKey; /** ** An array of document attributes that are nested facets within a facet. *
** For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the * document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned * to "Engineering". You can display nested facets in the search results so that documents can be searched not only * by department but also by a sub department within a department. This helps your users further narrow their * search. *
** You can only have one nested facet within a facet. If you want to increase this limit, contact Support. *
*/ private java.util.List* Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values * to less than 10. If you want to increase the default, contact Support. *
*/ private Integer maxResults; /** ** The unique key for the document attribute. *
* * @param documentAttributeKey * The unique key for the document attribute. */ public void setDocumentAttributeKey(String documentAttributeKey) { this.documentAttributeKey = documentAttributeKey; } /** ** The unique key for the document attribute. *
* * @return The unique key for the document attribute. */ public String getDocumentAttributeKey() { return this.documentAttributeKey; } /** ** The unique key for the document attribute. *
* * @param documentAttributeKey * The unique key for the document attribute. * @return Returns a reference to this object so that method calls can be chained together. */ public Facet withDocumentAttributeKey(String documentAttributeKey) { setDocumentAttributeKey(documentAttributeKey); return this; } /** ** An array of document attributes that are nested facets within a facet. *
** For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the * document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned * to "Engineering". You can display nested facets in the search results so that documents can be searched not only * by department but also by a sub department within a department. This helps your users further narrow their * search. *
** You can only have one nested facet within a facet. If you want to increase this limit, contact Support. *
* * @return An array of document attributes that are nested facets within a facet. ** For example, the document attribute or facet "Department" includes a value called "Engineering". In * addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" * for documents assigned to "Engineering". You can display nested facets in the search results so that * documents can be searched not only by department but also by a sub department within a department. This * helps your users further narrow their search. *
*
* You can only have one nested facet within a facet. If you want to increase this limit, contact Support.
*/
public java.util.List
* An array of document attributes that are nested facets within a facet.
*
* For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the
* document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned
* to "Engineering". You can display nested facets in the search results so that documents can be searched not only
* by department but also by a sub department within a department. This helps your users further narrow their
* search.
*
* You can only have one nested facet within a facet. If you want to increase this limit, contact Support.
*
* For example, the document attribute or facet "Department" includes a value called "Engineering". In * addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for * documents assigned to "Engineering". You can display nested facets in the search results so that documents * can be searched not only by department but also by a sub department within a department. This helps your * users further narrow their search. *
*
* You can only have one nested facet within a facet. If you want to increase this limit, contact Support.
*/
public void setFacets(java.util.Collection
* An array of document attributes that are nested facets within a facet.
*
* For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the
* document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned
* to "Engineering". You can display nested facets in the search results so that documents can be searched not only
* by department but also by a sub department within a department. This helps your users further narrow their
* search.
*
* You can only have one nested facet within a facet. If you want to increase this limit, contact Support.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFacets(java.util.Collection)} or {@link #withFacets(java.util.Collection)} if you want to override the
* existing values.
*
* For example, the document attribute or facet "Department" includes a value called "Engineering". In * addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for * documents assigned to "Engineering". You can display nested facets in the search results so that documents * can be searched not only by department but also by a sub department within a department. This helps your * users further narrow their search. *
*
* You can only have one nested facet within a facet. If you want to increase this limit, contact Support.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Facet withFacets(Facet... facets) {
if (this.facets == null) {
setFacets(new java.util.ArrayList
* An array of document attributes that are nested facets within a facet.
*
* For example, the document attribute or facet "Department" includes a value called "Engineering". In addition, the
* document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for documents assigned
* to "Engineering". You can display nested facets in the search results so that documents can be searched not only
* by department but also by a sub department within a department. This helps your users further narrow their
* search.
*
* You can only have one nested facet within a facet. If you want to increase this limit, contact Support.
*
* For example, the document attribute or facet "Department" includes a value called "Engineering". In * addition, the document attribute or facet "SubDepartment" includes the values "Frontend" and "Backend" for * documents assigned to "Engineering". You can display nested facets in the search results so that documents * can be searched not only by department but also by a sub department within a department. This helps your * users further narrow their search. *
*
* You can only have one nested facet within a facet. If you want to increase this limit, contact Support.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Facet withFacets(java.util.Collection
* Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values
* to less than 10. If you want to increase the default, contact Support.
*
* Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values
* to less than 10. If you want to increase the default, contact Support.
*
* Maximum number of facet values per facet. The default is 10. You can use this to limit the number of facet values
* to less than 10. If you want to increase the default, contact Support.
*