Folding fields
Folding fields
The FoldingForThread/Folding components rely on three distinct fields in your index.
By default, those fields are:
-
@foldingcollectionIdentifies the folding group each item belongs to (for example, all items belonging to the
ABCfolding group should haveABCas their@foldingcollectionfield value). -
@foldingchildUniquely identifies each item.
-
@foldingparentIdentifies the parent of each item (for example, all items whose parent has
123as its@foldingchildvalue should have123as their@foldingparentvalue).NoteAny item whose
@foldingchildand@foldingparentfield values are identical is considered to have no parent.
Assuming you’re using the default folding fields, parent-child relationships could be represented as such in your index:
-
Sample one-level parent-child relationship:
-
Original message @foldingcollection: "ABC" @foldingchild: "123" @foldingparent: "123"
-
Reply 1 @foldingcollection: "ABC" @foldingchild: "124" @foldingparent: "123"
-
Reply 2 @foldingcollection: "ABC" @foldingchild: "125" @foldingparent: "123"
-
You should typically use the
FoldingForThreadcomponent when dealing only with one-level relationships. -
-
Sample multi-level parent-child relationship:
-
Original message @foldingcollection: "ABC" @foldingchild: "123" @foldingparent: "123"
-
Reply 1 @foldingcollection: "ABC" @foldingchild: "124" @foldingparent: "123"
-
Attachment 1 @foldingcollection: "ABC" @foldingchild: "127" @foldingparent: "124"
-
-
Reply 2 @foldingcollection: "ABC" @foldingchild: "125" @foldingparent: "123"
-
You should typically use the
Foldingcomponent when you may have to deal with multi-level relationships. -
If necessary, you can specify custom folding fields to use instead of the default ones with the following FoldingForThread/Folding configuration options:
-
fieldto override@foldingcollection -
childto override@foldingchild -
parentto override@foldingparentIf you specify custom folding fields, remember that in the index, each folding field must:
-
Be of the String type.
-
Have the Displayable in Results option enabled.
Moreover, values in the
childandparentfields may only contain up to 60 alphanumeric characters (for example, assuming you’re using the default folding fields,123abcis a valid@foldingchild/@foldingparentvalue, whereas123_abcis not). -
|
|
Notes
|