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

Dumas: Count of Monte Cristo #456

Closed
LenaHenningsen opened this issue Mar 22, 2021 · 7 comments
Closed

Dumas: Count of Monte Cristo #456

LenaHenningsen opened this issue Mar 22, 2021 · 7 comments
Assignees
Labels
bug gh-pages issues with the webpage of this repo
Milestone

Comments

@LenaHenningsen
Copy link
Collaborator

I just had a look on the database results on the homepage: what happened to the Count of Monte Cristo? I can't find him there, but didn't he have 10 hits or so?? Thanks much!

@duncdrum
Copy link
Member

Screenshot 2021-03-22 at 12 23 07

@whalekeykeeper can you follow up on this W0084 is the work in question

@whalekeykeeper
Copy link
Contributor

Sure. Will have a look today.

@duncdrum duncdrum added bug gh-pages issues with the webpage of this repo labels Aug 12, 2021
@duncdrum duncdrum added this to the 1.1.0 milestone Aug 12, 2021
@duncdrum
Copy link
Member

@whalekeykeeper did you follow up on this?

@duncdrum duncdrum self-assigned this Aug 12, 2021
@duncdrum duncdrum pinned this issue Aug 12, 2021
@duncdrum
Copy link
Member

duncdrum commented Aug 13, 2021

ok to get to the bottom of the case of the missing count;

the sql query responsible for constructing the view data is here.

select distinct a.act_id, a.act_object, ps.title from Act a, PrimarySource ps inner join PrimarySource on a.act_object = ps.prim_source_id  where ps.title_lang = a.id_lang and a.act_object!='W0414'

while two lines below the view in the screenshot above contains the correct data

select distinct a.act_id, a.act_object, w.creator, (select distinct ps.title from PrimarySource ps where a.act_object = ps.prim_source_id) as title, (select distinct coalesce(p.family_name, '') || ' ' || coalesce(p.first_name, '') from Person p where w.creator = p.person_id) as name from Act a, Work w inner join Work on a.act_object = w.work_id where a.act_object!='W0414'

we need to adjust the first query to return the correct results. Alternatively replace the sql query with an xquery run via basex (that outputs csv) and queries the xml files instead of the csv.

@whalekeykeeper
Copy link
Contributor

checked the returned value for both SQL queries.
Returned by the first query:

Screen Shot 2021-08-15 at 11 30 58 PM

Returned by the second query:

Screen Shot 2021-08-15 at 11 29 08 PM

@whalekeykeeper
Copy link
Contributor

I think the problem is:
title_lang for Le Comte de Monte-Cristo is fr, while the SQL query has where clause where ps.title_lang = a.id_lang.
All the values in the id_lang field in Act.csv are en.
Therefore, the SQL query will not return a book name in French.

Screen Shot 2021-08-15 at 11 38 11 PM

@duncdrum
Copy link
Member

well done, thank you

Screenshot 2021-08-18 at 13 43 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug gh-pages issues with the webpage of this repo
Projects
None yet
Development

No branches or pull requests

4 participants