Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearchWindow: Use edition path for collection function #156

Closed
Tracked by #437
roewenstrunk opened this issue Dec 1, 2021 · 4 comments · Fixed by #463
Closed
Tracked by #437

SearchWindow: Use edition path for collection function #156

roewenstrunk opened this issue Dec 1, 2021 · 4 comments · Fixed by #463

Comments

@roewenstrunk
Copy link
Member

roewenstrunk commented Dec 1, 2021

https://github.com/Edirom/Edirom-Online/blob/develop/add/data/xql/search.xql at the moment queries the database root (/db) collection; thus it returns result from outside the current edition context

@bwbohl bwbohl changed the title Use edition path for collection function Search: Use edition path for collection function Feb 9, 2022
@bwbohl bwbohl added this to the refactoring milestone Jun 17, 2022
@bwbohl bwbohl changed the title Search: Use edition path for collection function SearchWindow: Use edition path for collection function Jun 5, 2024
@krHERO krHERO moved this to New in Edirom Development Jul 3, 2024
@krHERO krHERO removed this from the refactoring milestone Jul 4, 2024
@bwbohl bwbohl added Type: bug report Area: Usability Issue concerning usability labels Sep 6, 2024
@bwbohl bwbohl moved this from New to Backlog in Edirom Development Sep 6, 2024
@bwbohl bwbohl added this to the 1.0.0 milestone Sep 6, 2024
@peterstadler
Copy link
Member

peterstadler commented Sep 13, 2024

Is there a canonical function for retrieving the edition context? Is this somehow related to #83 ?

@hizclick
Copy link
Contributor

hizclick commented Oct 24, 2024

@roewenstrunk Kun je daar wat dieper op ingaan?

@hizclick hizclick self-assigned this Nov 6, 2024
peterstadler added a commit that referenced this issue Nov 6, 2024
@bwbohl
Copy link
Member

bwbohl commented Nov 7, 2024

@hizclick this is basically about the hard coded paths in

let $search :=
if (string-length($term) gt 0) then (
collection('/db')//tei:text[ft:query(., $term)]/ancestor::tei:TEI
| collection('/db')//tei:title[ft:query(., $term)]/ancestor::tei:TEI
| collection('/db')//mei:mei[ft:query(., $term)]
| collection('/db')//mei:title[ft:query(., $term)]/ancestor::mei:mei
| collection('/db')//mei:annot[ft:query(., $term)][@type eq 'editorialComment']
| collection('/db')//mei:annot[contains(@xml:id, $term)]
) else
()

Looking at these the collection that is being queried is '/db' – the whole database. This of course might make sense in some context (e.g., when an Edirom deployment only includes one edition of one work). But, e.g., if you have multiple editions installed the search will also return hits from those.

@bwbohl
Copy link
Member

bwbohl commented Nov 7, 2024

@peterstadler

No there is not but there definitely should be! Such a function could be useful in many places in the Edirom Online.

peterstadler added a commit that referenced this issue Nov 10, 2024
peterstadler added a commit that referenced this issue Nov 20, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Edirom Development Dec 2, 2024
daniel-jettka pushed a commit that referenced this issue Dec 2, 2024
daniel-jettka added a commit that referenced this issue Dec 2, 2024
* rename module util to eutil

* update module calls

* renaming namespace #462

* Update testing/XQSuite/eutil-tests.xqm

Co-authored-by: Dennis Ried <[email protected]>

* Update add/controller.xql

Co-authored-by: Dennis Ried <[email protected]>

* corrected missed occurence

* rename module util to eutil

* update module calls

* renaming namespace #462

* Update testing/XQSuite/eutil-tests.xqm

Co-authored-by: Dennis Ried <[email protected]>

* Update add/controller.xql

Co-authored-by: Dennis Ried <[email protected]>

* first shot at fixing #156

* that's actually not needed

The `edition` parameter is automatically added by `window.doAJAXRequest`

* move variables to query body

and fix parameter name from `uri` to `edition`

* fix function for displaying kwic results

* improve inline function documentation

* fix callback function

* directly do search

when query terms are entered via the top bar text input

* order imports and declarations

according to the Style Guide

* corrected missed occurence

---------

Co-authored-by: Daniel Jettka <[email protected]>
Co-authored-by: Peter Stadler <[email protected]>
Co-authored-by: Hizkiel <[email protected]>
Diginaut pushed a commit to korngold-werkausgabe/Edirom-Online_EWK-WA that referenced this issue Dec 16, 2024
Diginaut pushed a commit to korngold-werkausgabe/Edirom-Online_EWK-WA that referenced this issue Dec 16, 2024
* rename module util to eutil

* update module calls

* renaming namespace Edirom#462

* Update testing/XQSuite/eutil-tests.xqm

Co-authored-by: Dennis Ried <[email protected]>

* Update add/controller.xql

Co-authored-by: Dennis Ried <[email protected]>

* corrected missed occurence

* rename module util to eutil

* update module calls

* renaming namespace Edirom#462

* Update testing/XQSuite/eutil-tests.xqm

Co-authored-by: Dennis Ried <[email protected]>

* Update add/controller.xql

Co-authored-by: Dennis Ried <[email protected]>

* first shot at fixing Edirom#156

* that's actually not needed

The `edition` parameter is automatically added by `window.doAJAXRequest`

* move variables to query body

and fix parameter name from `uri` to `edition`

* fix function for displaying kwic results

* improve inline function documentation

* fix callback function

* directly do search

when query terms are entered via the top bar text input

* order imports and declarations

according to the Style Guide

* corrected missed occurence

---------

Co-authored-by: Daniel Jettka <[email protected]>
Co-authored-by: Peter Stadler <[email protected]>
Co-authored-by: Hizkiel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants