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

Allow --without_cmodel option to take multiple content models #80

Open
mjordan opened this issue Jul 5, 2019 · 3 comments
Open

Allow --without_cmodel option to take multiple content models #80

mjordan opened this issue Jul 5, 2019 · 3 comments

Comments

@mjordan
Copy link
Collaborator

mjordan commented Jul 5, 2019

In #74, @bondjimbond asks, "Is there a simple way that this might be tweaked to allow multiple comma-separated choices?"

Providing a comma-separated list of cmodel PIDs seems obvious, particularly since commas are not allowed in PIDs.

Splitting the value of --without_cmodel on a comma within this block and then modifying the Solr query to OR them together seems like it might work.

@bondjimbond do you feel like you want to take this on or would you prefer I do it?

@bondjimbond
Copy link
Contributor

If you've got time to do so I would be happy to see you do it; I'm going to be on vacation very soon so won't have a chance.

I'd also add that a comma-separated list of choices would be appropriate for most if not all of the CRUD options -- although as I said in #79, we'd have to be careful about our assumptions for whether the commas mean AND or OR.

In the --without_cmodel case, of course, it's obviously AND. But it might be different for other options.

@mjordan
Copy link
Collaborator Author

mjordan commented Jul 5, 2019

I can take a stab. But, I disagree with your statement "In the --without_cmodel case, of course, it's obviously AND." If we provide multiples and AND them, only objects with both cmodels would be selected. I don't know of many situations where an object would have multiple cmodels other than people entities (I think, that edge case sticks in my mind for some reason). Does that make sense or am I not talking about what you're saying.

I'm not sure about allowing multiple options for most CRUD operations. I suspect that would introduce a lot of complexity, and to be honest, I don't have the capacity to deal with more complexity.

@bondjimbond
Copy link
Contributor

I disagree with your statement "In the --without_cmodel case, of course, it's obviously AND." If we provide multiples and AND them, only objects with both cmodels would be selected. I don't know of many situations where an object would have multiple cmodels other than people entities (I think, that edge case sticks in my mind for some reason). Does that make sense or am I not talking about what you're saying.

I think we're just interpreting "and" differently. :) I'm saying if you choose --without_cmodel=islandora:sp_pdf,ir:citationCmodel, you are saying "I want objects without the PDF Cmodel, AND without the Citation Cmodel."

So it's more an AND NOT statement.

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

No branches or pull requests

2 participants