G2A Many GEOs
SHARE
TWEET

Failed public catalog Located URI search, no flag

kmlussier Jan 8th, 2018 8 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 2018-01-08 11:33:49.613 EST [5530] evergreen@evergreen LOG:  duration: 131.336 ms  statement:         -- bib search: #CD_documentLength #CD_meanHarmonic #CD_uniqueWords core_limit(100000) badge_orgs(1) estimation_strategy(inclusion) skip_check(0) check_limit(1000) tolkien depth(0)
  2.                 WITH w AS (
  3.  
  4.  
  5.         WITH xe8a2db8_keyword_xq AS (SELECT
  6.               (to_tsquery('english_nostop', COALESCE(NULLIF( '(' || btrim(regexp_replace(search_normalize(split_date_range($_5529$tolkien$_5529$)),E'(?:\\s+|:)','&','g'),'&|')  || ')', '()'), '')) || to_tsquery('simple', COALESCE(NULLIF( '(' || btrim(regexp_replace(search_normalize(split_date_range($_5529$tolkien$_5529$)),E'(?:\\s+|:)','&','g'),'&|')  || ')', '()'), ''))) AS tsq,
  7.               (to_tsquery('english_nostop', COALESCE(NULLIF( '(' || btrim(regexp_replace(search_normalize(split_date_range($_5529$tolkien$_5529$)),E'(?:\\s+|:)','&','g'),'&|')  || ')', '()'), '')) || to_tsquery('simple', COALESCE(NULLIF( '(' || btrim(regexp_replace(search_normalize(split_date_range($_5529$tolkien$_5529$)),E'(?:\\s+|:)','&','g'),'&|')  || ')', '()'), ''))) AS tsq_rank ),lang_with AS (SELECT id FROM config.coded_value_map WHERE ctype = 'item_lang' AND code = $_5529$eng$_5529$),        pop_with AS (
  8.                     SELECT  record,
  9.                             ARRAY_AGG(badge) AS badges,
  10.                             SUM(s.score::NUMERIC*b.weight::NUMERIC)/SUM(b.weight::NUMERIC) AS total_score
  11.                       FROM  rating.record_badge_score s
  12.                             JOIN rating.badge b ON (
  13.                                 b.id = s.badge
  14.          AND b.scope = ANY ('{1}')) GROUP BY 1)
  15.         ,c_attr AS (SELECT (ARRAY_TO_STRING(ARRAY[c_attrs,search.calculate_visibility_attribute_test('circ_lib','{1,2,3,4,5,6,7,8,9}',FALSE)],'&'))::query_int AS vis_test FROM asset.patron_default_visibility_mask() x)
  16.         ,b_attr AS (SELECT (ARRAY_TO_STRING(ARRAY[b_attrs,search.calculate_visibility_attribute_test('luri_org','{1}',FALSE)],'&'))::query_int AS vis_test FROM asset.patron_default_visibility_mask() x)
  17.         SELECT  id,
  18.                 rel,
  19.                 CASE WHEN cardinality(records) = 1 THEN records[1] ELSE NULL END AS record,
  20.                 NULL::INT AS total,
  21.                 NULL::INT AS checked,
  22.                 NULL::INT AS visible,
  23.                 NULL::INT AS deleted,
  24.                 NULL::INT AS excluded,
  25.                 badges,
  26.                 popularity
  27.           FROM  (SELECT m.source AS id,
  28.                         ARRAY[m.source] AS records,
  29.                         (AVG(
  30.                   (COALESCE(ts_rank_cd('{0.1, 0.2, 0.4, 1.0}', xe8a2db8_keyword.index_vector, xe8a2db8_keyword.tsq_rank, 14) * xe8a2db8_keyword.weight, 0.0)
  31.                   * evergreen.rel_bump(('{' || quote_literal(search_normalize($_5529$tolkien$_5529$)) || '}')::TEXT[], xe8a2db8_keyword.value, '{word_order}'::TEXT[], '{10}'::NUMERIC[]))
  32.                 )+1 * COALESCE( NULLIF( FIRST(mrv.vlist @> ARRAY[lang_with.id]), FALSE )::INT * 5, 1))::NUMERIC AS rel,
  33.                         1.0/((AVG(
  34.                   (COALESCE(ts_rank_cd('{0.1, 0.2, 0.4, 1.0}', xe8a2db8_keyword.index_vector, xe8a2db8_keyword.tsq_rank, 14) * xe8a2db8_keyword.weight, 0.0)
  35.                   * evergreen.rel_bump(('{' || quote_literal(search_normalize($_5529$tolkien$_5529$)) || '}')::TEXT[], xe8a2db8_keyword.value, '{word_order}'::TEXT[], '{10}'::NUMERIC[]))
  36.                 )+1 * COALESCE( NULLIF( FIRST(mrv.vlist @> ARRAY[lang_with.id]), FALSE )::INT * 5, 1)))::NUMERIC AS rank,
  37.                         FIRST(pubdate_t.value) AS tie_break,
  38.                         STRING_AGG(ARRAY_TO_STRING(pop_with.badges,','),',') AS badges,
  39.                         AVG(COALESCE(pop_with.total_score::NUMERIC,0.0::NUMERIC))::NUMERIC(2,1) AS popularity
  40.                   FROM  metabib.metarecord_source_map m
  41.  
  42.                 LEFT JOIN (
  43.                   SELECT fe.*, fe_weight.weight, xe8a2db8_keyword_xq.tsq, xe8a2db8_keyword_xq.tsq_rank /* search */
  44.                     FROM  metabib.keyword_field_entry AS fe
  45.                       JOIN config.metabib_field AS fe_weight ON (fe_weight.id = fe.field)
  46.                     JOIN xe8a2db8_keyword_xq ON (fe.index_vector @@ xe8a2db8_keyword_xq.tsq)
  47.                 ) AS xe8a2db8_keyword ON (m.source = xe8a2db8_keyword.source)
  48.  
  49.                         INNER JOIN metabib.record_attr_vector_list mrv ON m.source = mrv.source
  50.                         INNER JOIN biblio.record_entry bre ON m.source = bre.id
  51.                         LEFT JOIN pop_with ON ( m.source = pop_with.record )
  52.                         LEFT JOIN metabib.record_sorter pubdate_t ON m.source = pubdate_t.source AND attr = 'pubdate'
  53.                         ,lang_with
  54.                         ,c_attr
  55.                         ,b_attr
  56.                   WHERE 1=1
  57.                         AND (
  58.                   (xe8a2db8_keyword.id IS NOT NULL)
  59.                 )
  60.                 AND (
  61.                   (EXISTS (SELECT 1 FROM asset.copy_vis_attr_cache WHERE record = m.source AND vis_attr_vector @@ c_attr.vis_test)) OR ((b_attr.vis_test IS NULL OR bre.vis_attr_vector @@ b_attr.vis_test))
  62.                 )
  63.                   GROUP BY 1
  64.                   ORDER BY 4 ASC NULLS LAST,  5 DESC NULLS LAST, 3 DESC
  65.                   LIMIT 100000
  66.                 ) AS core_query
  67.         ) (SELECT * FROM w LIMIT 1000 OFFSET 0)
  68.                 UNION ALL
  69.           SELECT NULL,NULL,NULL,COUNT(*),COUNT(*),COUNT(*),0,0,NULL,NULL FROM w;
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top