Advanced Search by Bib Call Number Returns 0 Results

Bug #1074096 reported by Robert J Jackson
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Low
Unassigned
2.7
Fix Released
Undecided
Unassigned
2.8
Fix Released
Undecided
Unassigned

Bug Description

Evergreen 2.2.2
Postgres 9.1
Debian Squeeze

When attempting to query by Advanced Search -> Numeric Search with a selection of Bib Call Number an error is encounted as follows:

Caught error from 'run' method: Exception: OpenSRF::EX::ERROR 2012-11-01T10:22:44 OpenSRF::Application /usr/local/share/perl/5.10.1/OpenSRF/Application.pm:209 System ERROR: Call to open-ils.storage for method open-ils.storage.biblio.multiclass.staged.search_fts.staff.atomic
 failed with exception: Exception: OpenSRF::EX::ERROR 2012-11-01T10:22:44 OpenILS::Application::AppUtils /usr/local/share/perl/5.10.1/OpenILS/Application/AppUtils.pm:186 System ERROR: Exception: OpenSRF::DomainObject::oilsMethodException 2012-11-01T10:22:44 OpenSRF::AppRequest /usr/local/share/perl/5.10.1/OpenSRF/AppSession.pm:1064 <500> *** Call to [open-ils.storage.biblio.multiclass.staged.search_fts.staff.atomic] failed for session [1351779763.88325974.147008885412], thread trace [1]:
DBD::Pg::st execute failed: ERROR: syntax error at or near ")"
LINE 21: WHERE fe_weight.id IN ()
                                    ^
QUERY: SELECT m.source AS id,
        ARRAY_ACCUM(DISTINCT m.source) AS records,
        1.0/(AVG(
        (COALESCE(ts_rank_cd(xacd12f0_identifier_bib_cn.index_vector, xacd12f0_identifier_bib_cn.tsq, 14) * xacd12f0_identifier_bib_cn.weight, 0.0))
    )+1)::NUMERIC AS rel,
        1.0/(AVG(
        (COALESCE(ts_rank_cd(xacd12f0_identifier_bib_cn.index_vector, xacd12f0_identifier_bib_cn.tsq, 14) * xacd12f0_identifier_bib_cn.weight, 0.0))
    )+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)

    LEFT JOIN (
        SELECT fe.*, fe_weight.weight, x.tsq /* search */
          FROM metabib.identifier_field_entry AS fe
            JOIN config.metabib_field AS fe_weight ON (fe_weight.id = fe.field)
            JOIN (SELECT
            to_tsquery('identifier', COALESCE(NULLIF( '(' || btrim(regexp_replace($_32475$PN1997.G59$_32475$,E'(?:\\s+|:)','&','g'),'&|') || ')', '()'), '')) AS tsq ) AS x ON (fe.index_vector @@ x.tsq)
            WHERE fe_weight.id IN ()
    ) AS xacd12f0_identifier_bib_cn ON (m.source = xacd12f0_identifier_bib_cn.source)
  WHERE 1=1

Discussion in chat indicated there may be something missing from a configuration table but we are not able to determine the setting(s) required to make this query perform as in 2.1 release.

In 2.1 the query would return results based on records that contain the call number string entered in one of the MARC call number fields. (082, 050 or 092 for example)

Changed in evergreen:
status: New → Triaged
Revision history for this message
Sarah Childs (sarahc) wrote :

Still get 0 results with this search in 2.5

Revision history for this message
Kathy Lussier (klussier) wrote :

Adding a link to a recent IRC discussion on this issue with the suggestion that Bib Call Number not be included as a default since many sites have indicated they don't use bib call numbers - http://irc.evergreen-ils.org/evergreen/2014-10-09#i_130269.

Also, a discussion in IRC today indicates that it should work with call numbers in the 099 field - http://irc.evergreen-ils.org/evergreen/2014-12-04#i_142338.

Revision history for this message
Kathy Lussier (klussier) wrote :

Working branch to remove the bib call number search as an option in the default numeric search screen at

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/kmlussier/remove-bib-cn-search

Release notes include instructions for restoring it if a site wants to use it.

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.next
importance: Undecided → Low
Revision history for this message
Yamil (ysuarez) wrote :

I would be interested in at least making the "bill call number" option appear lower in the list of options. In my library I actually make "Call Number (Shelf Browser)" the top (default) choice and I remove bib call number search option completely.

Revision history for this message
Kathy Lussier (klussier) wrote :

Given that most sites have indicated they do not use this search option, my preference is to remove it entirely. I think it causes confusion for users for sites that do not know how to remove it and also causes confusion for new libraries moving to Evergreen.

Revision history for this message
Rogan Hamby (rogan-hamby) wrote : Re: [Bug 1074096] Re: Advanced Search by Bib Call Number Returns 0 Results
Download full text (3.6 KiB)

I am in favor of removing it entirely.

On Thu, Dec 11, 2014 at 12:48 PM, Kathy Lussier <email address hidden>
wrote:
>
> Given that most sites have indicated they do not use this search option,
> my preference is to remove it entirely. I think it causes confusion for
> users for sites that do not know how to remove it and also causes
> confusion for new libraries moving to Evergreen.
>
> --
> You received this bug notification because you are subscribed to
> Evergreen.
> Matching subscriptions: evergreenbugs
> https://bugs.launchpad.net/bugs/1074096
>
> Title:
> Advanced Search by Bib Call Number Returns 0 Results
>
> Status in Evergreen - Open ILS:
> Triaged
>
> Bug description:
> Evergreen 2.2.2
> Postgres 9.1
> Debian Squeeze
>
> When attempting to query by Advanced Search -> Numeric Search with a
> selection of Bib Call Number an error is encounted as follows:
>
>
> Caught error from 'run' method: Exception: OpenSRF::EX::ERROR
> 2012-11-01T10:22:44 OpenSRF::Application
> /usr/local/share/perl/5.10.1/OpenSRF/Application.pm:209 System ERROR: Call
> to open-ils.storage for method
> open-ils.storage.biblio.multiclass.staged.search_fts.staff.atomic
> failed with exception: Exception: OpenSRF::EX::ERROR
> 2012-11-01T10:22:44 OpenILS::Application::AppUtils
> /usr/local/share/perl/5.10.1/OpenILS/Application/AppUtils.pm:186 System
> ERROR: Exception: OpenSRF::DomainObject::oilsMethodException
> 2012-11-01T10:22:44 OpenSRF::AppRequest
> /usr/local/share/perl/5.10.1/OpenSRF/AppSession.pm:1064 <500> *** Call to
> [open-ils.storage.biblio.multiclass.staged.search_fts.staff.atomic] failed
> for session [1351779763.88325974.147008885412], thread trace [1]:
> DBD::Pg::st execute failed: ERROR: syntax error at or near ")"
> LINE 21: WHERE fe_weight.id IN ()
> ^
> QUERY: SELECT m.source AS id,
> ARRAY_ACCUM(DISTINCT m.source) AS records,
> 1.0/(AVG(
> (COALESCE(ts_rank_cd(xacd12f0_identifier_bib_cn.index_vector,
> xacd12f0_identifier_bib_cn.tsq, 14) * xacd12f0_identifier_bib_cn.weight,
> 0.0))
> )+1)::NUMERIC AS rel,
> 1.0/(AVG(
> (COALESCE(ts_rank_cd(xacd12f0_identifier_bib_cn.index_vector,
> xacd12f0_identifier_bib_cn.tsq, 14) * xacd12f0_identifier_bib_cn.weight,
> 0.0))
> )+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)
>
>
> LEFT JOIN (
> SELECT fe.*, fe_weight.weight, x.tsq /* search */
> FROM metabib.identifier_field_entry AS fe
> JOIN config.metabib_field AS fe_weight ON (fe_weight.id =
> fe.field)
> JOIN (SELECT
> to_tsquery('identifier', COALESCE(NULLIF( '(' ||
> btrim(regexp_replace($_32475$PN1997.G59$_32475$,E'(?:\\s+|:)','&','g'),'&|')
> || ')', '()'), '')) AS tsq ) AS x ON (fe.index_vector @@ x.tsq)
> WHERE fe_weight.id IN ()
> ) AS xacd12f0_identifier_bib_cn ON (m.source =
> xacd12f0_identifier_bib_cn.source)
> WHERE 1=1
>
> Discussion in chat indicated there may be something m...

Read more...

Revision history for this message
Sarah Childs (sarahc) wrote :
Download full text (7.2 KiB)

+1 to removing it entirely.

On Thu, Dec 11, 2014 at 12:59 PM, Rogan Hamby <email address hidden> wrote:

> I am in favor of removing it entirely.
>
> On Thu, Dec 11, 2014 at 12:48 PM, Kathy Lussier <
> <email address hidden>>
> wrote:
> >
> > Given that most sites have indicated they do not use this search option,
> > my preference is to remove it entirely. I think it causes confusion for
> > users for sites that do not know how to remove it and also causes
> > confusion for new libraries moving to Evergreen.
> >
> > --
> > You received this bug notification because you are subscribed to
> > Evergreen.
> > Matching subscriptions: evergreenbugs
> > https://bugs.launchpad.net/bugs/1074096
> >
> > Title:
> > Advanced Search by Bib Call Number Returns 0 Results
> >
> > Status in Evergreen - Open ILS:
> > Triaged
> >
> > Bug description:
> > Evergreen 2.2.2
> > Postgres 9.1
> > Debian Squeeze
> >
> > When attempting to query by Advanced Search -> Numeric Search with a
> > selection of Bib Call Number an error is encounted as follows:
> >
> >
> > Caught error from 'run' method: Exception: OpenSRF::EX::ERROR
> > 2012-11-01T10:22:44 OpenSRF::Application
> > /usr/local/share/perl/5.10.1/OpenSRF/Application.pm:209 System ERROR:
> Call
> > to open-ils.storage for method
> > open-ils.storage.biblio.multiclass.staged.search_fts.staff.atomic
> > failed with exception: Exception: OpenSRF::EX::ERROR
> > 2012-11-01T10:22:44 OpenILS::Application::AppUtils
> > /usr/local/share/perl/5.10.1/OpenILS/Application/AppUtils.pm:186 System
> > ERROR: Exception: OpenSRF::DomainObject::oilsMethodException
> > 2012-11-01T10:22:44 OpenSRF::AppRequest
> > /usr/local/share/perl/5.10.1/OpenSRF/AppSession.pm:1064 <500> *** Call
> to
> > [open-ils.storage.biblio.multiclass.staged.search_fts.staff.atomic]
> failed
> > for session [1351779763.88325974.147008885412], thread trace [1]:
> > DBD::Pg::st execute failed: ERROR: syntax error at or near ")"
> > LINE 21: WHERE fe_weight.id IN ()
> > ^
> > QUERY: SELECT m.source AS id,
> > ARRAY_ACCUM(DISTINCT m.source) AS records,
> > 1.0/(AVG(
> > (COALESCE(ts_rank_cd(xacd12f0_identifier_bib_cn.index_vector,
> > xacd12f0_identifier_bib_cn.tsq, 14) * xacd12f0_identifier_bib_cn.weight,
> > 0.0))
> > )+1)::NUMERIC AS rel,
> > 1.0/(AVG(
> > (COALESCE(ts_rank_cd(xacd12f0_identifier_bib_cn.index_vector,
> > xacd12f0_identifier_bib_cn.tsq, 14) * xacd12f0_identifier_bib_cn.weight,
> > 0.0))
> > )+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)
> >
> >
> > LEFT JOIN (
> > SELECT fe.*, fe_weight.weight, x.tsq /* search */
> > FROM metabib.identifier_field_entry AS fe
> > JOIN config.metabib_field AS fe_weight ON (fe_weight.id =
> > fe.field)
> > JOIN (SELECT
> > to_tsquery('identifier', COALESCE(NULLIF( '(' ||
> >
> btrim(regexp_replace($_32475$PN1997.G59$_32475$,E'(?:\\s+|:)','&','g'),'&|')
> > || ')', '(...

Read more...

Revision history for this message
Rogan Hamby (rogan-hamby) wrote :

I just pushed a sign off.

Revision history for this message
Ben Shum (bshum) wrote :

Picked Kathy and Rogan's signoff to master for 2.8.

Changed in evergreen:
milestone: 2.next → 2.8-beta
status: Triaged → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
Revision history for this message
Jeff Davis (jdavis-sitka) wrote :

The fix for this bug does not remove Bib Call Number as an option from the query type selector, so it still appears as an option in the search type dropdown in most places.

Working branch user/jeffdavis/lp1074096_finish_removing_bib_call_number has a commit that removes Bib Call Number from the query type selector:
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=commitdiff;h=0bdcf1c87eccf8b9f06ae673e4051a70112ca477

Changed in evergreen:
status: Fix Released → Triaged
milestone: 2.8-beta → 2.8.1
Changed in evergreen:
milestone: 2.8.1 → 2.8.2
Revision history for this message
RASHMA KUMARAN (rkumaran) wrote :

Tested in Evergreen: 2.8

No Exception or Error seen while querying from Advanced Search--->Numeric Search.

Bib Call Number option is removed from default Numeric Search Screen, no longer listed as an option in Search type dropdown.

Revision history for this message
Kathy Lussier (klussier) wrote :

Thanks for testing this Rashma! If this looks good enough to make it into the core code, could you add a signoff by making the following statement?:

“I have tested this code and consent to signing off on it with my name, [enter name or consistent alias] and my email address, [enter email address].”

You could also add a signedoff tag to the bug to bring it to the attention of the core committers who can then merge the code.

Thanks again!
Kathy

Revision history for this message
Michael Peters (mrpeters) wrote :

Signoff @ user/mrpeters/lp1074096_finish_removing_bib_call_number_signoff

tags: added: signedoff
Revision history for this message
Ben Shum (bshum) wrote :

Pushed to master, rel_2_8, and rel_2_7.

Changed in evergreen:
status: Triaged → Fix Committed
milestone: 2.8.2 → none
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.