@@ -21,29 +21,21 @@ package algoliasearch.ingestion
21
21
22
22
import algoliasearch .ingestion .RecordType ._
23
23
24
- import org .json4s ._
25
-
26
24
/** DestinationInput
25
+ *
26
+ * @param indexName
27
+ * Algolia index name (case-sensitive).
28
+ * @param attributesToExclude
29
+ * Attributes from your source to exclude from Algolia records. Not all your data attributes will be useful for
30
+ * searching. Keeping your Algolia records small increases indexing and search performance. - Exclude nested
31
+ * attributes with `.` notation. For example, `foo.bar` indexes the `foo` attribute and all its children **except**
32
+ * the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element. For
33
+ * example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but indexes
34
+ * the complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes `bar` from all
35
+ * elements of the `foo` array.
27
36
*/
28
- sealed trait DestinationInput
29
-
30
- trait DestinationInputTrait extends DestinationInput
31
-
32
- object DestinationInput {}
33
-
34
- object DestinationInputSerializer extends Serializer [DestinationInput ] {
35
- override def deserialize (implicit format : Formats ): PartialFunction [(TypeInfo , JValue ), DestinationInput ] = {
36
-
37
- case (TypeInfo (clazz, _), json) if clazz == classOf [DestinationInput ] =>
38
- json match {
39
- case value : JObject => Extraction .extract[DestinationIndexName ](value)
40
- case _ => throw new MappingException (" Can't convert " + json + " to DestinationInput" )
41
- }
42
- }
43
-
44
- override def serialize (implicit format : Formats ): PartialFunction [Any , JValue ] = { case value : DestinationInput =>
45
- value match {
46
- case value : DestinationIndexName => Extraction .decompose(value)(format - this )
47
- }
48
- }
49
- }
37
+ case class DestinationInput (
38
+ indexName : String ,
39
+ recordType : Option [RecordType ] = scala.None ,
40
+ attributesToExclude : Option [Seq [String ]] = scala.None
41
+ )
0 commit comments