Fixed some syntax errors, but getting no results when I'd expect some
I searched with this
container(bre,bookbag,12,$authtoken)
where $authtoken is substituted with an actual live authtoken for the
user that owns that container, and here is the example generated query
that returns no results:
SELECT * FROM search.query_parser_fts(
4::INT,
2::INT,
$core_query_3553$SELECT m.source AS id,
ARRAY_ACCUM(DISTINCT m.source) AS records,
1.0/((AVG(
(1)
) * COALESCE( NULLIF( FIRST(mrd.attrs @> hstore('item_lang', $_3553$eng$_3553$)), FALSE )::INT * 5, 1)))::NUMERIC AS rel,
1.0/((AVG(
(1)
) * COALESCE( NULLIF( FIRST(mrd.attrs @> hstore('item_lang', $_3553$eng$_3553$)), FALSE )::INT * 5, 1)))::NUMERIC AS rank,
FIRST(mrd.attrs->'date1') AS tie_break
FROM metabib.metarecord_source_map m
JOIN metabib.record_attr mrd ON (m.source = mrd.id)
JOIN ( SELECT ci.target_biblio_record_entry AS container_item
FROM container.biblio_record_entry_bucket_item ci
JOIN container.biblio_record_entry_bucket c ON (c.id = ci.bucket)
WHERE c.btype = $_3553$bookbag$_3553$ AND c.id = 12
AND (c.pub IS TRUE OR c.owner = 1)) container ON (container.container_item = mrd.id)
WHERE 1=1
AND (TRUE)
GROUP BY 1
ORDER BY 4 ASC NULLS LAST, 5 DESC NULLS LAST, 3 DESC
LIMIT 10000
$core_query_3553$::TEXT,
$${}$$::INT[],
$${}$$::INT[],
NULL::INT,
1000::INT,
10000::INT,
'f'::BOOL,
't'::BOOL
);
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>