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

(-)a/C4/Search.pm (-2 / +12 lines)
Lines 1048-1053 sub _build_weighted_query { Link Here
1048
        $weighted_query .= "an=\"$operand\"";
1048
        $weighted_query .= "an=\"$operand\"";
1049
    }
1049
    }
1050
1050
1051
    # If the index is numeric, don't autoquote it.
1052
    elsif ( $index =~ /,st-numeric$/ ) {
1053
        $weighted_query .= " $index=$operand";
1054
    }
1055
1051
    # If the index already has more than one qualifier, wrap the operand
1056
    # If the index already has more than one qualifier, wrap the operand
1052
    # in quotes and pass it back (assumption is that the user knows what they
1057
    # in quotes and pass it back (assumption is that the user knows what they
1053
    # are doing and won't appreciate us mucking up their query
1058
    # are doing and won't appreciate us mucking up their query
Lines 1150-1155 sub getIndexes{ Link Here
1150
                    'Illustration-code',
1155
                    'Illustration-code',
1151
                    'Index-term-genre',
1156
                    'Index-term-genre',
1152
                    'Index-term-uncontrolled',
1157
                    'Index-term-uncontrolled',
1158
                    'Interest-age-level',
1159
                    'Interest-grade-level',
1153
                    'ISBN',
1160
                    'ISBN',
1154
                    'isbn',
1161
                    'isbn',
1155
                    'ISSN',
1162
                    'ISSN',
Lines 1164-1169 sub getIndexes{ Link Here
1164
                    'LC-card-number',
1171
                    'LC-card-number',
1165
                    'lcn',
1172
                    'lcn',
1166
                    'lex',
1173
                    'lex',
1174
                    'lexile-number',
1167
                    'llength',
1175
                    'llength',
1168
                    'ln',
1176
                    'ln',
1169
                    'ln-audio',
1177
                    'ln-audio',
Lines 1198-1203 sub getIndexes{ Link Here
1198
                    'popularity',
1206
                    'popularity',
1199
                    'pubdate',
1207
                    'pubdate',
1200
                    'Publisher',
1208
                    'Publisher',
1209
                    'Reading-grade-level',
1201
                    'Record-control-number',
1210
                    'Record-control-number',
1202
                    'rcn',
1211
                    'rcn',
1203
                    'Record-type',
1212
                    'Record-type',
Lines 1543-1550 sub buildQuery { Link Here
1543
                #which is processed higher up in this sub. Other than that, year searches are typically
1552
                #which is processed higher up in this sub. Other than that, year searches are typically
1544
                #handled as limits which are not processed her either.
1553
                #handled as limits which are not processed her either.
1545
1554
1546
                # Date of Publication
1555
                # Search ranges: Date of Publication, st-numeric
1547
                if ( $index =~ /yr/ ) {
1556
                if ( $index =~ /(yr|st-numeric)/ ) {
1548
                    #weight_fields/relevance search causes errors with date ranges
1557
                    #weight_fields/relevance search causes errors with date ranges
1549
                    #In the case of YYYY-, it will only return records with a 'yr' of YYYY (not the range)
1558
                    #In the case of YYYY-, it will only return records with a 'yr' of YYYY (not the range)
1550
                    #In the case of YYYY-YYYY, it will return no results
1559
                    #In the case of YYYY-YYYY, it will return no results
Lines 1784-1789 sub buildQuery { Link Here
1784
        warn "LIMIT DESC:" . $limit_desc;
1793
        warn "LIMIT DESC:" . $limit_desc;
1785
        warn "---------\nLeave buildQuery\n---------";
1794
        warn "---------\nLeave buildQuery\n---------";
1786
    }
1795
    }
1796
1787
    return (
1797
    return (
1788
        undef,              $query, $simple_query, $query_cgi,
1798
        undef,              $query, $simple_query, $query_cgi,
1789
        $query_desc,        $limit, $limit_cgi,    $limit_desc,
1799
        $query_desc,        $limit, $limit_cgi,    $limit_desc,
(-)a/etc/zebradb/biblios/etc/bib1.att (-1 / +5 lines)
Lines 350-356 att 9900 Author-personal-bibliography Link Here
350
# Author-in-order - firstname lastname in 245$c statement of responsibility
350
# Author-in-order - firstname lastname in 245$c statement of responsibility
351
att 9902    Author-in-order
351
att 9902    Author-in-order
352
# Lexile number
352
# Lexile number
353
att 9903    lex
353
att 9903    lexile-number
354
att 9908    Interest-age-level
355
att 9909    Interest-grade-level
356
att 9910    Reading-grade-level
357
354
att 9904    arl
358
att 9904    arl
355
att 9013    arp
359
att 9013    arp
356
att 9520    Item
360
att 9520    Item
(-)a/etc/zebradb/ccl.properties (-1 / +5 lines)
Lines 1126-1132 ff7-01-02 1=8703 Link Here
1126
l-format ff7-01-02
1126
l-format ff7-01-02
1127
1127
1128
# Lexile Number
1128
# Lexile Number
1129
lex 1=9903 r=r
1129
lexile-number 1=9903 r=r
1130
lex lexile-number
1131
Interest-age-level 1=9908 r=r
1132
Interest-grade-level 1=9909 r=r
1133
Reading-grade-level 1=9910 r=r
1130
1134
1131
#Accelerated Reader Level
1135
#Accelerated Reader Level
1132
arl 1=9904 r=r
1136
arl 1=9904 r=r
(-)a/etc/zebradb/marc_defs/marc21/biblios/biblio-koha-indexdefs.xml (-5 / +19 lines)
Lines 552-562 Link Here
552
    <target_index>Abstract:w</target_index>
552
    <target_index>Abstract:w</target_index>
553
    <target_index>Abstract:p</target_index>
553
    <target_index>Abstract:p</target_index>
554
  </index_data_field>
554
  </index_data_field>
555
  <!--record.abs line 153: melm 521$a      lex:n-->
555
  <index_subfields tag="521" subfields="a" condition="@ind1='0'">
556
  <index_subfields tag="521" subfields="a">
556
    <target_index>Reading-grade-level:w</target_index>
557
    <target_index>lex:w</target_index>
557
    <target_index>Reading-grade-level:p</target_index>
558
    <target_index>lex:p</target_index>
558
    <target_index>Reading-grade-level:n</target_index>
559
    <target_index>lex:n</target_index>
559
  </index_subfields>
560
  <index_subfields tag="521" subfields="a" condition="@ind1='1'">
561
    <target_index>Interest-age-level:w</target_index>
562
    <target_index>Interest-age-level:p</target_index>
563
    <target_index>Interest-age-level:n</target_index>
564
  </index_subfields>
565
  <index_subfields tag="521" subfields="a" condition="@ind1='2'">
566
    <target_index>Interest-grade-level:w</target_index>
567
    <target_index>Interest-grade-level:p</target_index>
568
    <target_index>Interest-grade-level:n</target_index>
569
  </index_subfields>
570
  <index_subfields tag="521" subfields="a" condition="@ind1='8'">
571
    <target_index>lexile-number:w</target_index>
572
    <target_index>lexile-number:p</target_index>
573
    <target_index>lexile-number:n</target_index>
560
  </index_subfields>
574
  </index_subfields>
561
  <!--record.abs line 154: melm 526$c      arl,arl:n-->
575
  <!--record.abs line 154: melm 526$c      arl,arl:n-->
562
  <index_subfields tag="526" subfields="c">
576
  <index_subfields tag="526" subfields="c">
(-)a/etc/zebradb/marc_defs/marc21/biblios/biblio-zebra-indexdefs.xsl (-8 / +36 lines)
Lines 451-463 definition file (probably something like {biblio,authority}-koha-indexdefs.xml) Link Here
451
    </xslo:for-each>
451
    </xslo:for-each>
452
  </xslo:template>
452
  </xslo:template>
453
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='521']">
453
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='521']">
454
    <xslo:for-each select="marc:subfield">
454
    <xslo:if test="@ind1='0'">
455
      <xslo:if test="contains('a', @code)">
455
      <xslo:for-each select="marc:subfield">
456
        <z:index name="lex:w lex:p lex:n">
456
        <xslo:if test="contains('a', @code)">
457
          <xslo:value-of select="."/>
457
          <z:index name="Reading-grade-level:w Reading-grade-level:p Reading-grade-level:n">
458
        </z:index>
458
            <xslo:value-of select="."/>
459
      </xslo:if>
459
          </z:index>
460
    </xslo:for-each>
460
        </xslo:if>
461
      </xslo:for-each>
462
    </xslo:if>
463
    <xslo:if test="@ind1='1'">
464
      <xslo:for-each select="marc:subfield">
465
        <xslo:if test="contains('a', @code)">
466
          <z:index name="Interest-age-level:w Interest-age-level:p Interest-age-level:n">
467
            <xslo:value-of select="."/>
468
          </z:index>
469
        </xslo:if>
470
      </xslo:for-each>
471
    </xslo:if>
472
    <xslo:if test="@ind1='2'">
473
      <xslo:for-each select="marc:subfield">
474
        <xslo:if test="contains('a', @code)">
475
          <z:index name="Interest-grade-level:w Interest-grade-level:p Interest-grade-level:n">
476
            <xslo:value-of select="."/>
477
          </z:index>
478
        </xslo:if>
479
      </xslo:for-each>
480
    </xslo:if>
481
    <xslo:if test="@ind1='8'">
482
      <xslo:for-each select="marc:subfield">
483
        <xslo:if test="contains('a', @code)">
484
          <z:index name="lexile-number:w lexile-number:p lexile-number:n">
485
            <xslo:value-of select="."/>
486
          </z:index>
487
        </xslo:if>
488
      </xslo:for-each>
489
    </xslo:if>
461
  </xslo:template>
490
  </xslo:template>
462
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='526']">
491
  <xslo:template mode="index_subfields" match="marc:datafield[@tag='526']">
463
    <xslo:for-each select="marc:subfield">
492
    <xslo:for-each select="marc:subfield">
464
- 

Return to bug 14277