-
Notifications
You must be signed in to change notification settings - Fork 14
Detailed flow of a query
Detailed Flow of a Query:
- Keyword Search on LingsProperty
- Find Selected Lings, Properties, LingsProperty (ANY)
- Filters
- LingsProperty by Ling Depth
- LingsProperty by Ling Parent ID
- Showing Criteria
- Keyword Search on Example
- Group By (ALL)
- Link LingsPropVal with Lings and Props
- Advanced Features
Check for invalid combinations, e.g. all on some selector box and Example clicked. That is invalid.
Fold any keyword searches on lingpropval into their appropriate selector box, e.g. a keyword search on word initial "G" for ling name will be a selection on Greek and German among others (if lings are languages).
This will be intersected with any other selections in that selector box to give a net set of selections.
Perform disjunctions ("any") from selection boxes. (If there are conjunctions ("all") treat these as disjunctions ("any") for the purposes of this step. This saves work for later.)
Each such disjunction gives a set of LingPropVal rows. They may be at different depths, e.g. sentence-property-value, speaker-property-value. So we need to tie these together.
First intersect rows having lingids at the same depth. This gives a set of LingPropVal rows at each depth.
Tie together the rows at different depths based on Ling.parentid. This can give a join result having more than three columns.
In the result, a row concerning a sentence survives only if the speaker of that sentence survives the demographic query and a row concerning a speaker survives only if a sentence survives the linguistic query.
If examples are clicked, then join with the results of the LingPropVal queries based on LingPropValID and filter further based on keyword searches on example attributes.
If all is clicked for at least one selection box, then perform a group by on the fields of the ShowClickboxes.
Call those fields the ShowFields. This group by is unusual in that there are no aggregates. Instead, for each distinct value of the ShowFields (i.e. each distinct combination of values), we associate a vector of values for each field F on which there is an all.
So, for each such distinct value combination c, we have a vector v of F values.
We check whether the selected F values in the selector box is a subset of v.
If so, then c passes into the solution. Otherwise, it doesn't.
Link up with attributes table based on lingid and possibly exampleid as appropriate. Order by language-property.
Advanced Features are mutually exclusive and can all be handled as a postprocessing step. List of Advanced Features: