You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/abcd-modules/opac-abcd/opac-admin/3-databases/facets.md
+23-5Lines changed: 23 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,22 +8,31 @@ sidebar_position: 2
8
8
9
9
Facets are the side filters that appear after a search (e.g., "Filter by Year", "Filter by Author"). They allow users to refine a broad search into a specific set of records by grouping results based on common values.
Facets rely on a combination of the **Inverted File (Index)** for counting and the **Master File** for display.
16
20
***Prerequisite:** You cannot create a facet for a field that is not indexed in the database's **FST** (Field Selection Table).
17
21
***Technique:** Ideally, fields used for facets should be indexed using **Technique 0 (Line)**.
18
22
23
+
To edit the facets, go to the ABCD Settings menu -> OPAC -> Under "Databases," select one of the available databases -> Click on the database, then in the top menu, under “Search,” locate "Facets."
The configuration file is a pipe-delimited text file where each line represents a facet box. The interface allows you to define 4 specific columns:
22
31
23
32
| Column | Name | Description | Example |
24
33
| :--- | :--- | :--- | :--- |
25
34
|**1**|**Label**| The title of the facet box displayed to the user. |`Authors`|
26
-
|**2**|**Extraction Format**| A mini-PFT (ISIS Format) to extract the value from the record. **Crucial:** Use `/` at the end to handle repetitive fields correctly. |`v100^a/`|
35
+
|**2**|**Extraction Format**| A mini-PFT (ISIS Format) to extract the value from the record. **Crucial:** Use `/` at the end to handle repetitive fields correctly. Use parentheses ( ) if it is a repetitive field, that is, one that contains more than one instance of the same information. |`(v100^a/)`|
27
36
|**3**|**Prefix**| The FST prefix used to filter the search when the user clicks a term. |`AU_`|
28
37
|**4**|**Sort Order**| Defines how the terms inside the facet box are sorted.<br/>**Q**: By Quantity (Highest count first).<br/>**A**: Alphabetical order (A-Z). |`Q`|
29
38
@@ -49,12 +58,21 @@ Subject (Topic)|v650^a/|MA_|Q
49
58
***Format:**`v100^a/` (Extracts subfield `^a`. The `/` ensures that if a book has 3 authors, 3 separate lines are generated).
50
59
***Prefix:**`AU_` (Matches the FST index).
51
60
***Sort:**`Q` (Shows the most prolific authors at the top).
52
-
53
-
54
61
***Row 3 (Year):**
55
62
***Sort:**`A` (Alphabetical/Numerical). This is better for dates, so the years appear as 1990, 1991, 1992, rather than by popularity.
56
63
64
+
For facets to work, the output format—that is, the format that generates the link in the facet blocks—must have the same structure as the data in the index.
65
+
If you configure the display to show “Last Name, First Name” with the prefix AU_, and this is a combination of a field and a subfield, the FST must be indexed as “AU_Last Name, First Name”.
57
66
67
+
:::danger Warning!
68
+
The | pipe character, used for concatenation in the FST, does not work in the facet display format.
69
+
70
+
Therefore, if the FST contains:
71
+
`(|AU_|v160^*,|, |v160^b,'%'/)`
72
+
In the facets, the pipe must be replaced with `'` (single quotes), so the format becomes:
73
+
`(|AU_|v160^*,', 'v160^b,/)`
74
+
Remove the percent sign as well; it does not work as a display format.
0 commit comments