Bug 9861 - Solr: HTTP 404 when i click on title or author in search results
Summary: Solr: HTTP 404 when i click on title or author in search results
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.10
Hardware: All All
: P1 - high major (vote)
Assignee: claire.hernandez@biblibre.com
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 9862
  Show dependency treegraph
 
Reported: 2013-03-20 09:25 UTC by Hend
Modified: 2015-06-04 23:24 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Error raised when i click on title (11.36 KB, image/png)
2013-03-20 09:25 UTC, Hend
Details
Error raised when i click on author (20.72 KB, image/png)
2013-03-20 09:26 UTC, Hend
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hend 2013-03-20 09:25:37 UTC
Created attachment 16459 [details]
Error raised when i click on title

I searched for some word[keyword] in OPAC    then i tried to click on the title or the author i got "HTTP 404" error.
Comment 1 Hend 2013-03-20 09:26:37 UTC
Created attachment 16460 [details]
Error raised when i click on author
Comment 2 claire.hernandez@biblibre.com 2013-03-20 09:48:10 UTC
Hello Hend, I am happy to see tickets filled about Solr ;) First, just be carefull, Solr implementation is not ready for production.

To go forward, I can propose you 2 things:

1/ Check you index configuration because the submitted config is for unimarc record
indexes.yaml contains:
  - code: author
    facetable: 1
    label: Author
    mandatory: 0
    mappings:
      - 700$*
      - 710$*
    ressource_type: biblio
    sortable: 1
    type: str

You can change it by UI: http://<pro.community.local>/cgi-bin/koha/admin/searchengine/solr/indexes.pl

2/ Can you past me the output of both commands:

$ ./misc/migration_tools/rebuild_solr.pl -i
$ ./misc/migration_tools/rebuild_solr.pl -t biblio -n 2
Comment 3 claire.hernandez@biblibre.com 2013-03-20 09:52:31 UTC
Mistake from me: I got the same error as you when I click on the author in result list. This feature is not implemented. But when I click on the title, I am going to the biblio detail page http://.../cgi-bin/koha/opac-detail.pl?biblionumber=1
Comment 4 Hend 2013-03-20 10:08:13 UTC
I had changed the indexes mapping to the following :
indexes:
  - code: title
    facetable: 1
    label: Title
    mandatory: 1
    mappings:
      - 245$a
      - 245$b
      - 245$c
    ressource_type: biblio
    sortable: 1
    type: ste
  - code: author
    facetable: 1
    label: Author
    mandatory: 0
    mappings:
      - 100$*
      - 110$*
      - 111$*
    ressource_type: biblio
    sortable: 1
    type: str
So the fields corresponds to marc21 tags
When i tried to run ./misc/migration_tools/rebuild_solr.pl -i
I got :
SolrAPI = http://kohaUrl:8983/solr/koha
How many indexed documents = 11435;
and when i tried to run ./misc/migration_tools/rebuild_solr.pl -t biblio -n 2
i got :
IndexRecord called with biblio 1 2 at /opt/ActivePerl-5.12/lib/Koha/SearchEngine/Solr/Index.pm line 35.
Indexing biblio 1 at /opt/ActivePerl-5.12/lib/Koha/SearchEngine/Solr/Index.pm line 55.
Indexing biblio 2 at /opt/ActivePerl-5.12/lib/Koha/SearchEngine/Solr/Index.pm line 55.
Comment 5 Hend 2013-03-24 09:54:49 UTC
I had found this error in koha-opac-error.log
opac-detail.pl: Argument "Alex70" isn't numeric in int at /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl line 72., referer: http://koha.bibalex.org/cgi-bin/koha/opac-search.pl?idx=&q=ivory

Alex70 ==> exists in tag 001 ...
Comment 6 Hend 2013-03-24 10:20:09 UTC
I had found that title has link  http://koha.bibalex.org/cgi-bin/koha/opac-detail.pl?biblionumber=Alex70
Why it doesn't take biblionumber from biblio table instead of tag001
I tried to get the corresponding  biblionumber from biblio table and wrote the following in the browser it opened
http://koha.bibalex.org/cgi-bin/koha/opac-detail.pl?biblionumber=124
Comment 7 Hend 2013-04-30 09:19:13 UTC
I had found that koha biblionumber [999$c]  is different from that existing in tag001 . Solr reads that exists in tag001 which is "Alex70" but the actual biblionumber is 124 . 
So i had changed the solr indexes to read biblionumber from 999$c instead and then i re-indexed all data. The problem is solved.
Comment 8 Hend 2013-04-30 10:18:56 UTC
For the author problem i had changed "/cgi-bin/koha/opac-search.pl?q=author:[% SEARCH_RESULT.author |url %]  to "/cgi-bin/koha/opac-search.pl?idx=au&q=[% SEARCH_RESULT.author |url %] ...it worked . Now , i can get bib records by the selected author.
Comment 9 Katrin Fischer 2014-10-23 17:14:34 UTC
The solr search code has been removed from Koha.