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

Add option to query for PID ranges #29

Open
mjordan opened this issue Jun 8, 2017 · 3 comments
Open

Add option to query for PID ranges #29

mjordan opened this issue Jun 8, 2017 · 3 comments

Comments

@mjordan
Copy link
Collaborator

mjordan commented Jun 8, 2017

E.g., --pid_range=<1000, '--pid_range=>1000, --pid_range=1000-2000`.

Possible syntax: PID:[* TO islandora:1000] , PID:[islandora:1000 TO *] , PID:[islanodra:1000 TO islandora:2000] .

@mjordan
Copy link
Collaborator Author

mjordan commented Jun 8, 2017

Queries like PID:[islandora\:110 TO islandora*] don't work, probably because the end of the range is open ended. Queries like PID:[islandora\:110 TO islandora\:9999999] and PID:[islandora\:0 TO islandora\:117] do work however.

@mjordan
Copy link
Collaborator Author

mjordan commented Jun 14, 2017

I'm now wondering if instead of providing shortcuts to do queries we should just document a bunch of different types of queries under the "Fetching PIDs" section.

@mjordan
Copy link
Collaborator Author

mjordan commented Jun 14, 2017

Another useful query: get all objects that have the word "sample" in the mods_note_t field:

drush islandora_datastream_crud_fetch_pids --user=admin  --solr_query=mods_note_t:sample --pid_file=/tmp/sample_pids.txt

The PID range query from the previous comment can be used like this:

drush islandora_datastream_crud_fetch_pids --user=admin  --solr_query="PID:[islandora\:110 TO islandora\:9999999]" --pid_file=/tmp/higherthan110.pids

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant