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

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

Return to bug 14277