Skip to content

Commit c2b5ac5

Browse files
Create extended_age_query.md
1 parent 725d729 commit c2b5ac5

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Extended Age Query (EAQ) Design & Implementation
2+
3+
## Overview
4+
5+
The Extended Age Query (EAQ) feature enhances query capabilities for **Collection Objects (COs)** in the Query Builder by enabling filters based on geological age. Available in Geology, Invertebrate Paleontology, and Vertebrate Paleontology disciplines, EAQ supports both named time periods and explicit numerical ranges using start/end values (in Millions of Years Ago, MYA).
6+
7+
## Core Logic & Filtering Criteria
8+
9+
- **Numeric-Based Logic**
10+
EAQ exclusively uses numerical start and end values; no names are directly used for computation—names are converted into numeric ranges by the system.
11+
12+
- **Valid Periods Only**
13+
Only Chronostratigraphy nodes from the `GeologicTimePeriod` table with valid `StartPeriod` and `EndPeriod` values (where StartPeriod > EndPeriod) are considered for queries.
14+
15+
- **Range Calculation**
16+
The query computes its range using:
17+
- **Lowest** `EndPeriod` across relevant nodes
18+
- **Highest** `StartPeriod` across relevant nodes
19+
Because MYA increases into the past, higher StartPeriod means older boundary.
20+
21+
## User Interface & Workflow
22+
23+
1. **Add Age Field**
24+
In the Query Builder, users select "Age" on their Collection Object query.
25+
26+
2. **Select Query Method**
27+
- **Name**: User enters a geological time period name, which the system converts into start/end values and displays the name in the UI.
28+
- **Range**: User enters explicit start and end numeric values (e.g., `15` and `5` for 15–5 MYA).
29+
30+
3. **Choose Search Mode**
31+
- **Strict**: Returns COs whose entire age range lies within the specified window.
32+
- **Non-strict**: Returns COs whose age ranges overlap at all with the specified window.
33+
34+
4. **Execute Query**
35+
The system determines the applicable age range using either the named period or numeric values and filters results accordingly.
36+
37+
## Search Scope Across Age Fields
38+
39+
EAQ applies to the following age contexts within Collection Objects:
40+
41+
- **Relative Age**
42+
Uses `AgeNameID` (FK to `GeologicTimePeriod`) to establish a chronostratigraphic linkage and then applies the underlying start/end values.
43+
44+
- **Absolute Age**
45+
Computes a range using: AbsoluteAge + AgeUncertainty to AbsoluteAge – AgeUncertainty
46+
- **Paleo Context**
47+
Bound by `ChronosStratID` (and optionally `ChronosStratEndID`). The system determines the widest combined range across both IDs using start/end values.
48+
49+
These three contexts are searched independently according to their respective logic.
50+
51+
## MVP Scope
52+
53+
For the Minimum Viable Product (MVP), the EAQ will only operate on **Collection Objects**.
54+
55+
## Summary Table
56+
57+
| Feature | Behavior |
58+
|------------------------|--------------------------------------------------------------------------|
59+
| Numeric Logic Only | Only start/end MYA values are used—names are converted internally |
60+
| Valid Periods Only | Filters apply only to Chronostrat nodes with valid start/end values |
61+
| Range Computation | Uses lowest EndPeriod and highest StartPeriod for range boundaries |
62+
| Query Methods | Supports both named period and explicit numeric range input |
63+
| Strict vs Non-strict | Determines whether results must fully fall within or just overlap range |
64+
| Search Contexts | Applies across Relative Age, Absolute Age, and Paleo Context |
65+
| Availability | Limited to Collection Object queries for MVP |
66+
67+

0 commit comments

Comments
 (0)