Bug #9889

OAI queries offset by 100

Added by Mike Cantelon about 6 years ago. Updated almost 6 years ago.

Status:VerifiedStart date:05/23/2016
Priority:HighDue date:
Assignee:Dan Gillean% Done:

0%

Category:OAI-PMH
Target version:Release 2.3.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

sql-dump-2016-06-13.sql (1.85 MB) Dan Gillean, 06/13/2016 07:35 PM

;oai.xml Magnifier (117 KB) Dan Gillean, 06/13/2016 07:37 PM

History

#1 Updated by Mike Cantelon about 6 years ago

You can verify the issue exists by creating some descriptions then trying to see them at:

index.php/;oai?verb=ListRecords&metadataPrefix=oai_dc&set=oai:virtual:top-level-records

What's currently happening is the default limit amount 100 is being used as an offset, so what happens is the query tries to skip the first 100 descriptions (returning nothing unless you've got more than 100 descriptions).

I've made a PR to fix: https://github.com/artefactual/atom/pull/362

#2 Updated by Mike Cantelon about 6 years ago

  • Status changed from New to Code Review
  • Assignee changed from Mike Cantelon to Nick Wilkinson
  • Priority changed from Medium to Critical

#3 Updated by Dan Gillean about 6 years ago

  • Category set to OAI-PMH
  • Target version set to Release 2.3.0

Good catch! This should definitely go in 2.3, we have several users who've previously funded OAI enhancements using this module in production.

#4 Updated by Nick Wilkinson about 6 years ago

  • Assignee changed from Nick Wilkinson to José Raddaoui Marín

#5 Updated by Jesús García Crespo about 6 years ago

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

#6 Updated by Mike Gale almost 6 years ago

Why is this marked as priority critical? Is AtoM completely unusable because of this issue? hehe

#7 Updated by Mike Cantelon almost 6 years ago

It breaks OAI.

#8 Updated by Dan Gillean almost 6 years ago

  • Status changed from QA/Review to Feedback
  • Assignee changed from Dan Gillean to Mike Cantelon
  • Priority changed from Critical to High

Hi Mike,

You've fixed the critical issue outlined in here - I can get results. Only: when I used your sample verb (which includes the top-level virtual sets), I am actually getting results from all levels at the moment - not just top-level records. I've made sure that support for virtual sets is turned on in my settings.

Note that I DO see top level records when using /index.php/;oai?verb=ListSets - and included in there as the last entry is the syntax you share for the top-level sets:

<set>
  <setSpec>oai:virtual:top-level-records</setSpec>
  <setName>Top-level collection record set</setName>
</set>

Is it possible we broke this option? Realized it is also not documented, so not sure....

#9 Updated by Mike Cantelon almost 6 years ago

Hrm... odd... I'll take a look.

#10 Updated by Mike Cantelon almost 6 years ago

  • Assignee changed from Mike Cantelon to Dan Gillean

Hi Dan,

I seem to only get top-level records using virtual:top-level-records...

;oai?verb=ListRecords&metadataPrefix=oai_dc&set=oai:virtual:top-level-records

Could you attach a dump of your DB and provide the hash of the exact commit of your testing codebase?

git log -n 1 --pretty=format:"%H"

#11 Updated by Dan Gillean almost 6 years ago

Going to test again now - currently testing on:

3725881b805343fed171883cad99ce0b87e2fbcc

#13 Updated by Dan Gillean almost 6 years ago

also attaching a save of the OAI output i'm seeing... scroll down a bit, you can see records like "Correspondence [Ba-Ba], which are child series of the Fred Wah fonds.

#14 Updated by Mike Cantelon almost 6 years ago

  • Status changed from Feedback to Code Review
  • Assignee changed from Dan Gillean to Nick Wilkinson

#15 Updated by Nick Wilkinson almost 6 years ago

  • Assignee changed from Nick Wilkinson to José Raddaoui Marín

#16 Updated by José Raddaoui Marín almost 6 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from José Raddaoui Marín to Mike Cantelon

Looks good!

#17 Updated by Mike Cantelon almost 6 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Mike Cantelon to Dan Gillean

Merged to qa/2.3.x and qa/2.4.x.

#18 Updated by Dan Gillean almost 6 years ago

  • Status changed from QA/Review to Verified

Nice, thanks

Also available in: Atom PDF