Hello Layale, I just noticed my reply was for you only a couple weeks ago and you acknowledged it to myself only as well. I'm re-posting for the sake of context: You told me you're running 3.14 and won't update in the near future, in that care it probably won't help you what I posted because of the following documentation: https://wiki.koha-community.org/wiki/How_to_add_new_zebra_index Where there is a different method up to version 3.16. You should be tweaking with the record.abs file in the same directory ( /etc/koha/zebradb/marc_defs/marc21/biblios). It's not xml, but it's not rocket science either. If you run the following command on the terminal: *# cat -n /etc/koha/zebradb/marc_defs/marc21/biblios/record.abs | grep "780"* You'll get something like: * 248 melm 780$t Title* * 249 melm 780$w Record-control-number* * 250 melm 780 Title,Title:p,Title-former,Related-periodical* Try removing the corresponding line where the 780$t is defined, and perform a full reindex of zebra before you try testing any search. Repeat for other fields you might need to tweak. Best of luck, Pedro Amorim Repost of original reply: ---- Hello Layale, What version of Koha are you using? Packages install? If on recent package install (>=3.20), I think you're seeing this behaviour because of the following lines in */etc/koha/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml :* 413 <index_data_field tag="245"> 414 <target_index>Title:w</target_index> 415 <target_index>Title:p</target_index> 416 </index_data_field> That is indexing the whole 245 field to the Title:w(word) and Title:p(phrase) search indexes. 1) Jump to dir */etc/koha/zebradb/marc_defs/marc21/biblios* 2) Remove those lines from the file (using vi/vim); 3) Run *xsltproc /etc/koha/zebradb/xsl/koha-indexdefs-to-zebra.xsl biblio-koha-indexdefs.xml > biblio-zebra-indexdefs.xsl* 4) Reindex zebra with *koha-rebuild-zebra -f -v <instancename>* There are a ton of fields and subfields mapping to Title:w and Title:p though and you might need to further tweak the indexes. I haven't tested this though, this is just based on my past (UNIMARC) experience on tuning advanced search indexes. Good luck! ----- 2017-03-07 16:10 GMT-01:00 Layale Bassil <lb26@aub.edu.lb>:
Hello,
I know it is an old question but I am facing a similar issue. I need to exclude only the 780$t and 785$t. which means when I specify title in the drop down search by, I don’t want the search to look into 780$t and 785$t however I want the search to search by 780$t and 785$t when I select search by keywords.
How should I edit biblio-koha-indexdefs.xml file to apply this condition?
Thank you in advance, Reagrds.
-----Original Message----- From: januszop@gmail.com [mailto:januszop@gmail.com] Sent: Saturday, December 3, 2016 10:20 PM To: Layale Bassil <lb26@aub.edu.lb>; koha@lists.katipo.co.nz Subject: RE: [Koha] Search by Title 245 subfields $a $b only
Hi Layale,
Depending on what type of installation you have, you would probably have to edit /etc/koha/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml and then transform it into biblio-zebra-indexdefs.xsl (or directly edit biblio-zebra-indexdefs.xsl). But -- again, depending on the type of your installation -- be aware of possible problems with upcoming updates.
Good luck!
Janusz
-----Original Message----- From: Koha [mailto:koha-bounces@lists.katipo.co.nz] On Behalf Of Layale Bassil Sent: Friday, December 2, 2016 5:23 PM To: 'koha@lists.katipo.co.nz' Subject: [Koha] Search by Title 245 subfields $a $b only Importance: High
Hello,
I need to know how can I edit the Zebra search in order to only search by subfields a and b when searching by title 245?
The search is currently searching other subfields like c and returning non-relevant results.
What files should I edit in this case?
Thank you in advance, Regards. _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
_______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha