Re: [OPEN-ILS-DEV] How to query coded_value_map via OSRF

2019-07-10 Thread Daniel Wells
Hello Ken, The second argument to PCRUD should be an Evergreen JSON-style where clause. Are you simply trying to get them all? I am actually not sure if there is a canonical way to do that, but one thing you could do is use a where clause which is always true, such as id != NULL, i.e.:

Re: [OPEN-ILS-DEV] How to query coded_value_map via OSRF

2019-07-10 Thread Ken Cox
Jason, Thank you, that is a great hint, but I'm not close enough to get it yet. In the past I've looked at OSRF methods registered in perl modules, and they were wrapped with some decorations that told me how they were supposed to be called (__PACKAGE__->register_method and look at the params

Re: [OPEN-ILS-DEV] Pcrud fleshing question

2019-07-10 Thread Jane Sandberg
, except that one of them can be > > null. How can I get all the nice data about the pickup_lib? > > > > Thanks! > > -Jane > > > > -- > > Jane Sandberg > > Electronic Resources Librarian > > Linn-Benton Community College > > sand...@linnben

Re: [OPEN-ILS-DEV] Pcrud fleshing question

2019-07-10 Thread Daniel Wells
Hello Jane, It looks like your issue is that the IDL is not correct. 'pickup_lib' should be a 'has_a' relationship. Despite the names, 'has_a' and 'might_have' are not for nullability, but key directionality. 'might_have' would mean that 'pickup_lib' (aou) has a key pointing back at bresv, but

[OPEN-ILS-DEV] Pcrud fleshing question

2019-07-10 Thread Jane Sandberg
Hi all, When I run the following in srfsh: request open-ils.pcrud open-ils.pcrud.search.bresv "", {"id" : {">" : 0}}, {"flesh" : 1, "flesh_fields" : {"bresv": ["pickup_lib"]}} The pickup_lib field is not fleshed; I just get its ID. However, if I change "pickup_lib" to "request_lib", it fleshes

Re: [OPEN-ILS-DEV] request help optimizing very slow select query for ebooks

2019-07-10 Thread Blake Henderson
Melissa, I've found this magic sauce to do the trick and QUICK select date_part('month',bre.create_date),count(*) from biblio.record_entry bre where not bre.deleted and create_date between '2019-01-01' and '2019-07-01' and lower(marc) ~ AND (     marc ~

Re: [OPEN-ILS-DEV] request help optimizing very slow select query for ebooks

2019-07-10 Thread Rogan Hamby
Hi Melissa, Quick question, are you looking for all ebooks or a certain subset indicate by the 'full text via%' matching? It's not clear to me if that's how you're identifying they are ebooks at all versus a subset of them. If you're looking for all of them you can use the fact that the fixed

[OPEN-ILS-DEV] request help optimizing very slow select query for ebooks

2019-07-10 Thread Melissa Belvadi
We're on 3.0.3, with under 2 million total biblio recs, under 1 million of those undeleted. The following query is taking over 10 hours to run at the command line or through pgadmin or dbeaver. For a system our size, that seems far too slow. We've checked other aspects of our server, e.g. other

Re: [OPEN-ILS-DEV] How to query coded_value_map via OSRF

2019-07-10 Thread Jason Stephenson
On 7/9/19 8:34 PM, Ken Cox wrote: > Is there a way to query the coded_value_map via OSRF?  I want to list > the search_format and icon_format values for use in the mobile app.  I > see a call to ctx.search_ccvm in coded_value_selector.tt2, but I can't > find that code anywhere.  I am swinging