This article describes the Wix Forum product fields you can search, sort, filter, and apply facets to when using the wix-search API.
To search Wix Forum posts and comments on your site, set the search document type as "Forum/Content"
:
Note The Forum fields supported by wix-search are not identical to the fields in your site's Forum/Posts and Forum/Comments collections.
The following fields appear in each matching search result document when searching Wix Forum content:
Description: Document type that was searched. In this case, "Forum/Content".
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: Post or comment ID.
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: Post title.
Type: String
Can search the content of this field: Yes
Can facet: No
Can sort: No
Can filter: No
Description: Text of the post or comment.
Type: String
Can search the content of this field: Yes
Can facet: No
Can sort: No
Can filter: No
Description: Relative URL of the post page on your site. For comments, the URL points to the location of the comment on your post page.
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: File source of the post image.
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: Indicates whether the document is a post or a comment. Value can be "POST" or "COMMENT".
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: eq, ne
You can use this field to filter search results so that only Forum posts or comments are returned. For example, the following code example demonstrates how to search only for Forum comments and not posts:Â
Description: ID of the post the comment is associated with. Only relevant for comments.
Type: StringÂ
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, leÂ
Description: Unique ID of the site visitor who posted the post or comment.
Type: StringÂ
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, leÂ
Description: ID of the category associated with the post.
Type: String
Can search the content of this field: No
Can facet: Yes
Can sort: No
Can filter: in, eq, ne, gt, ge, lt, leÂ
Description: Hashtags in the post.
Type: Array of Strings
Can search the content of this field: No
Can facet: Yes
Can sort: No
Can filter: hasSome, hasAll
Description: Date and time of the last action performed on the post or comment.
Type: Date
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, leÂ
Description: Number of likes the post or comment received.
Type: Number
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, le
Description: Number of views the post received.
Type: Number
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, le
Description: Number of comments the post received.
Type: Number
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, le
Description: Title of the post. Only relevant for posts.
Type: String
Can search the content of this field: Yes
Can facet: Yes
Can sort: No
Can filter: No
Description: Title of the category.
Type: String
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, le
Description: ID of the parent comment.
Type: String
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, le
Description: Date and time the comment or post was created.
Type: Date
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: eq, ne, gt, ge, lt, le
Description: Number of upvotes on the comment.
Type: Number
Can search the content of this field: No
Can facet: Yes
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, le
Description: Number of downvotes on the comment.
Type: Number
Can search the content of this field: No
Can facet: No
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, le
Description: Number of upvotes minus the number of downvotes.
Type: Number
Can search the content of this field: No
Can facet: No
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, le
Description: Date and time the comment or post was last edited.
Type: Date
Can search the content of this field: No
Can facet: No
Can sort: Yes
Can filter: eq, ne, gt, ge, lt, le
Description: Users mentioned in the post.
Type: Array of strings
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: IDs of the marked comments for the post (selected by forum admin or site owner).
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: Whether the comment is marked.
Type: String
Can search the content of this field: No
Can facet: No
Can sort: Yes
Can filter: in, eq, ne, gt, ge, lt, le
Description: Defines what interaction may be applied on the comment.
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: Images from the post content.
Type: Nested
Can search the content of this field: No
Can filter: in, eq, ne, gt, ge, lt, le
Nested fields:
Description: WixMedia image ID (nested under images
).
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: URL of the image (nested under images
).
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: Original height of the image (nested under images
).
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No
Description: Original width of the image (nested under images
).
Type: String
Can search the content of this field: No
Can facet: No
Can sort: No
Can filter: No