Feature #7120

Alter language facet to count unique documents regardless of culture

Added by Dan Gillean almost 8 years ago. Updated over 7 years ago.

Status:VerifiedStart date:08/19/2014
Priority:MediumDue date:
Assignee:Dan Gillean% Done:

0%

Category:I18NEstimated time:16.00 hours
Target version:Release 2.1.0
Google Code Legacy ID: Tested version:2.0.1, 2.1
Sponsored:Yes Requires documentation:

Description

This is a partially a feature, and partially a new approach to deal with existing bugs in AtoM.

Currently it is difficult to use AtoM in a multi-lingual environment due to the way that the facets handle culture. This new approach will improve multi-lingual searching in AtoM by creating, as the new default facet for language, sort of "All" facet - only its implementation will be specific to handle how ES counts documents.

The new default facet will be "Unique descriptions" or "Unique documents" - this will count the number of unique descriptions in AtoM regardless of the culture. It will NOT count translations as a unique document.

The specific language facets WILL display translations - i.e. if a user selects the English facet, and there is a translation available of a born-Spanish document, it will be counted in the English facet. Because of this, the sum of all language-specific facets may be greater than the total count for the Unique descriptions/documents facet. This is part of why we are not calling it an "All" facet.

The new facet will be made the default, allowing users to browse multi-lingually with the interface of AtoM still in the culture of their choosing. Users can select a language-specific facet to view all descriptions, including translations, for that culture

History

#1 Updated by José Raddaoui Marín almost 8 years ago

  • Status changed from New to In progress

#2 Updated by Jesús García Crespo over 7 years ago

  • Target version changed from Release 2.2.0 to Release 2.1.0

#3 Updated by Jesús García Crespo over 7 years ago

  • Status changed from In progress to Code Review
  • Assignee changed from José Raddaoui Marín to Jesús García Crespo

#4 Updated by Jesús García Crespo over 7 years ago

Radda has submitted a pull request: https://github.com/artefactual/atom/pull/45

#5 Updated by Jesús García Crespo over 7 years ago

Dan, we need to test this before the merge! The branch is dev/issue-7119.
I can show you today how to import a large data set for testing.

#6 Updated by Jesús García Crespo over 7 years ago

  • Status changed from Code Review to QA/Review
  • Assignee changed from Jesús García Crespo to Dan Gillean

#7 Updated by Jesús García Crespo over 7 years ago

  • Status changed from QA/Review to Feedback
  • Assignee changed from Dan Gillean to José Raddaoui Marín

Please see my comments in the PR, Radda.

#8 Updated by José Raddaoui Marín over 7 years ago

  • Status changed from Feedback to Code Review
  • Assignee changed from José Raddaoui Marín to Jesús García Crespo

#9 Updated by Jesús García Crespo over 7 years ago

  • Status changed from Code Review to QA/Review
  • Assignee changed from Jesús García Crespo to Dan Gillean

Dan, do you mind to test this before it's merged? It's a big change that may affect search results in different pages and I don't want to have many iterations for the same ticket in the main branch.

The branch is dev/issue-7119.

These are the pages affected by this change:
  • Actor browser
  • Accession browser
  • Digital object browser
  • Information object browser
  • Repository browser
  • Header typeahead
  • Advanced search
  • Taxonomy browser
  • Term browser

You can ask Radda what's changed in each page, I could also help later after noon when I'm back. Also, https://github.com/artefactual/atom/pull/45/files.

#10 Updated by Dan Gillean over 7 years ago

  • Status changed from QA/Review to Feedback
  • Assignee changed from Dan Gillean to José Raddaoui Marín

Busted! There is a parenthesis where there shouldn't be on line 310 of /lib/helper/QubitHelper.php, from the looks of it - it means the site won't load at all.

Nginx error log message:

2014/09/10 11:25:48 [error] 3101#0: *14 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected ')' in /home/fiver/Desktop/Projects/atom-dev/lib/helper/QubitHelper.php on line 310" while reading response header from upstream, client: 127.0.0.1, server: _, request: "GET /index.php/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.atom.sock:", host: "localhost:8002"

#11 Updated by Jesús García Crespo over 7 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean

Radda, please avoid submitting a PR for code review if you haven't tested locally. Additionally, you can use php [-l,--syntax-check] to double check.

Dan, I have pushed dev/issue-7119-jesus with the fix.

#12 Updated by Dan Gillean over 7 years ago

  • Status changed from QA/Review to Feedback
  • Assignee changed from Dan Gillean to José Raddaoui Marín

tested the local branch dev/issue-7119-jesus

Everything works great, except for one minor thing!

In my installation I have 57 unique descriptions.

To reproduce this error
  • Navigate to another entity browse page - e.g. authority records
  • Make sure you have content in multiple languages
  • Select one of the language facets, e.g. Spanish
Error encountered
  • While the specific language is selected, the count under "Unique documents" displays the count of unique information objects (e.g. 57)
  • If you switch back to the Unique docs facet, the count is corrected

Expected outcome
Unique document count always remains correct

#13 Updated by Jesús García Crespo over 7 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean

#14 Updated by Dan Gillean over 7 years ago

  • Status changed from QA/Review to Feedback
  • Assignee changed from Dan Gillean to José Raddaoui Marín

Sooooo close.

Works fine on Archival descriptions. On other entities, when a language is selected, the "Unique records" count goes to 0. Ideally, it should stay the same as when it is selected.

#15 Updated by José Raddaoui Marín over 7 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from José Raddaoui Marín to Dan Gillean

Ok, fixed. It was filtering drafts for actors/repositories.

#16 Updated by Dan Gillean over 7 years ago

  • Status changed from QA/Review to Verified

Works! Still discussing internally the best thing to call this new default facet. For now we have it as "Unique records" but it might be changed again in the future. the functionality works well though. Marking verified.

Also available in: Atom PDF