View | Details | Raw Unified | Return to bug 14277
Collapse All | Expand All

(-)a/C4/Search.pm (-2 / +12 lines)
Lines 1020-1025 sub _build_weighted_query { Link Here
1020
        $weighted_query .= "an=\"$operand\"";
1020
        $weighted_query .= "an=\"$operand\"";
1021
    }
1021
    }
1022
1022
1023
    # If the index is numeric, don't autoquote it.
1024
    elsif ( $index =~ /,st-numeric$/ ) {
1025
        $weighted_query .= " $index=$operand";
1026
    }
1027
1023
    # If the index already has more than one qualifier, wrap the operand
1028
    # If the index already has more than one qualifier, wrap the operand
1024
    # in quotes and pass it back (assumption is that the user knows what they
1029
    # in quotes and pass it back (assumption is that the user knows what they
1025
    # are doing and won't appreciate us mucking up their query
1030
    # are doing and won't appreciate us mucking up their query
Lines 1125-1130 sub getIndexes{ Link Here
1125
                    'Illustration-code',
1130
                    'Illustration-code',
1126
                    'Index-term-genre',
1131
                    'Index-term-genre',
1127
                    'Index-term-uncontrolled',
1132
                    'Index-term-uncontrolled',
1133
                    'Interest-age-level',
1134
                    'Interest-grade-level',
1128
                    'ISBN',
1135
                    'ISBN',
1129
                    'isbn',
1136
                    'isbn',
1130
                    'ISSN',
1137
                    'ISSN',
Lines 1139-1144 sub getIndexes{ Link Here
1139
                    'LC-card-number',
1146
                    'LC-card-number',
1140
                    'lcn',
1147
                    'lcn',
1141
                    'lex',
1148
                    'lex',
1149
                    'lexile-number',
1142
                    'llength',
1150
                    'llength',
1143
                    'ln',
1151
                    'ln',
1144
                    'ln-audio',
1152
                    'ln-audio',
Lines 1175-1180 sub getIndexes{ Link Here
1175
                    'Publisher',
1183
                    'Publisher',
1176
                    'Provider',
1184
                    'Provider',
1177
                    'pv',
1185
                    'pv',
1186
                    'Reading-grade-level',
1178
                    'Record-control-number',
1187
                    'Record-control-number',
1179
                    'rcn',
1188
                    'rcn',
1180
                    'Record-type',
1189
                    'Record-type',
Lines 1516-1523 sub buildQuery { Link Here
1516
                #which is processed higher up in this sub. Other than that, year searches are typically
1525
                #which is processed higher up in this sub. Other than that, year searches are typically
1517
                #handled as limits which are not processed her either.
1526
                #handled as limits which are not processed her either.
1518
1527
1519
                # Date of Publication
1528
                # Search ranges: Date of Publication, st-numeric
1520
                if ( $index =~ /yr/ ) {
1529
                if ( $index =~ /(yr|st-numeric)/ ) {
1521
                    #weight_fields/relevance search causes errors with date ranges
1530
                    #weight_fields/relevance search causes errors with date ranges
1522
                    #In the case of YYYY-, it will only return records with a 'yr' of YYYY (not the range)
1531
                    #In the case of YYYY-, it will only return records with a 'yr' of YYYY (not the range)
1523
                    #In the case of YYYY-YYYY, it will return no results
1532
                    #In the case of YYYY-YYYY, it will return no results
Lines 1746-1751 sub buildQuery { Link Here
1746
        warn "LIMIT DESC:" . $limit_desc;
1755
        warn "LIMIT DESC:" . $limit_desc;
1747
        warn "---------\nLeave buildQuery\n---------";
1756
        warn "---------\nLeave buildQuery\n---------";
1748
    }
1757
    }
1758
1749
    return (
1759
    return (
1750
        undef,              $query, $simple_query, $query_cgi,
1760
        undef,              $query, $simple_query, $query_cgi,
1751
        $query_desc,        $limit, $limit_cgi,    $limit_desc,
1761
        $query_desc,        $limit, $limit_cgi,    $limit_desc,
(-)a/etc/zebradb/biblios/etc/bib1.att (-1 / +5 lines)
Lines 351-357 att 9900 Author-personal-bibliography Link Here
351
# Author-in-order - firstname lastname in 245$c statement of responsibility
351
# Author-in-order - firstname lastname in 245$c statement of responsibility
352
att 9902    Author-in-order
352
att 9902    Author-in-order
353
# Lexile number
353
# Lexile number
354
att 9903    lex
354
att 9903    lexile-number
355
att 9908    Interest-age-level
356
att 9909    Interest-grade-level
357
att 9910    Reading-grade-level
358
355
att 9904    arl
359
att 9904    arl
356
att 9013    arp
360
att 9013    arp
357
att 9520    Item
361
att 9520    Item
(-)a/etc/zebradb/ccl.properties (-1 / +5 lines)
Lines 1137-1143 ff7-01-02 1=8703 Link Here
1137
l-format ff7-01-02
1137
l-format ff7-01-02
1138
1138
1139
# Lexile Number
1139
# Lexile Number
1140
lex 1=9903 r=r
1140
lexile-number 1=9903 r=r
1141
lex lexile-number
1142
Interest-age-level 1=9908 r=r
1143
Interest-grade-level 1=9909 r=r
1144
Reading-grade-level 1=9910 r=r
1141
1145
1142
#Accelerated Reader Level
1146
#Accelerated Reader Level
1143
arl 1=9904 r=r
1147
arl 1=9904 r=r
(-)a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml (-5 / +19 lines)
Lines 570-580 Link Here
570
    <target_index>Abstract:w</target_index>
570
    <target_index>Abstract:w</target_index>
571
    <target_index>Abstract:p</target_index>
571
    <target_index>Abstract:p</target_index>
572
  </index_data_field>
572
  </index_data_field>
573
  <!--record.abs line 153: melm 521$a      lex:n-->
573
  <index_subfields tag="521" subfields="a" condition="@ind1='0'">
574
  <index_subfields tag="521" subfields="a">
574
    <target_index>Reading-grade-level:w</target_index>
575
    <target_index>lex:w</target_index>
575
    <target_index>Reading-grade-level:p</target_index>
576
    <target_index>lex:p</target_index>
576
    <target_index>Reading-grade-level:n</target_index>
577
    <target_index>lex:n</target_index>
577
  </index_subfields>
578
  <index_subfields tag="521" subfields="a" condition="@ind1='1'">
579
    <target_index>Interest-age-level:w</target_index>
580
    <target_index>Interest-age-level:p</target_index>
581
    <target_index>Interest-age-level:n</target_index>
582
  </index_subfields>
583
  <index_subfields tag="521" subfields="a" condition="@ind1='2'">
584
    <target_index>Interest-grade-level:w</target_index>
585
    <target_index>Interest-grade-level:p</target_index>
586
    <target_index>Interest-grade-level:n</target_index>
587
  </index_subfields>
588
  <index_subfields tag="521" subfields="a" condition="@ind1='8'">
589
    <target_index>lexile-number:w</target_index>
590
    <target_index>lexile-number:p</target_index>
591
    <target_index>lexile-number:n</target_index>
578
  </index_subfields>
592
  </index_subfields>
579
  <!--record.abs line 154: melm 526$c      arl,arl:n-->
593
  <!--record.abs line 154: melm 526$c      arl,arl:n-->
580
  <index_subfields tag="526" subfields="c">
594
  <index_subfields tag="526" subfields="c">
(-)a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl (-8 / +36 lines)
Lines 474-486 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
474
    </xslo:for-each>
474
    </xslo:for-each>
475
  </xslo:template>
475
  </xslo:template>
476
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='521']">
476
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='521']">
477
    <xslo:for-each select="marc:subfield">
477
    <xslo:if test="@ind1='0'">
478
      <xslo:if test="contains('a', @code)">
478
      <xslo:for-each select="marc:subfield">
479
        <z:index name="lex:w lex:p lex:n">
479
        <xslo:if test="contains('a', @code)">
480
          <xslo:value-of select="."/>
480
          <z:index name="Reading-grade-level:w Reading-grade-level:p Reading-grade-level:n">
481
        </z:index>
481
            <xslo:value-of select="."/>
482
      </xslo:if>
482
          </z:index>
483
    </xslo:for-each>
483
        </xslo:if>
484
      </xslo:for-each>
485
    </xslo:if>
486
    <xslo:if test="@ind1='1'">
487
      <xslo:for-each select="marc:subfield">
488
        <xslo:if test="contains('a', @code)">
489
          <z:index name="Interest-age-level:w Interest-age-level:p Interest-age-level:n">
490
            <xslo:value-of select="."/>
491
          </z:index>
492
        </xslo:if>
493
      </xslo:for-each>
494
    </xslo:if>
495
    <xslo:if test="@ind1='2'">
496
      <xslo:for-each select="marc:subfield">
497
        <xslo:if test="contains('a', @code)">
498
          <z:index name="Interest-grade-level:w Interest-grade-level:p Interest-grade-level:n">
499
            <xslo:value-of select="."/>
500
          </z:index>
501
        </xslo:if>
502
      </xslo:for-each>
503
    </xslo:if>
504
    <xslo:if test="@ind1='8'">
505
      <xslo:for-each select="marc:subfield">
506
        <xslo:if test="contains('a', @code)">
507
          <z:index name="lexile-number:w lexile-number:p lexile-number:n">
508
            <xslo:value-of select="."/>
509
          </z:index>
510
        </xslo:if>
511
      </xslo:for-each>
512
    </xslo:if>
484
  </xslo:template>
513
  </xslo:template>
485
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='526']">
514
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='526']">
486
    <xslo:for-each select="marc:subfield">
515
    <xslo:for-each select="marc:subfield">
487
- 

Return to bug 14277