Skip to content

Commit

Permalink
Use string_punct_stop field types for searching
Browse files Browse the repository at this point in the history
  • Loading branch information
corylown authored and cbeer committed Dec 19, 2023
1 parent 7bca79e commit e1c8ca3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion config/solr_configs/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<field name="_version_" type="long" indexed="true" stored="true" />

<field name="id" type="string" indexed="true" stored="true" required="true" docValues="true" />
<field name="id_search" type="string_punct_stop" indexed="true" stored="false" />
<field name="timestamp" type="date" indexed="true" stored="true" default="NOW/SECOND" docValues="true" />
<field name="created" type="date" indexed="true" stored="true" default="NOW/SECOND" docValues="true" />
<field name="last_updated" type="date" indexed="true" stored="true" default="NOW/SECOND" docValues="true" />
Expand Down Expand Up @@ -197,6 +198,8 @@
<field name="reverse_shelfkey" type="alphaSort" indexed="true" stored="true" multiValued="true" />

<field name="barcode_search" type="string" indexed="true" stored="true" multiValued="true" docValues="true" />
<field name="item_barcodes" type="string" indexed="true" stored="true" multiValued="true" docValues="true" />
<field name="item_barcodes_search" type="string_punct_stop" indexed="true" stored="false" multiValued="true" />
<field name="preferred_barcode" type="string" indexed="false" stored="true" />
<field name="access_facet" type="string" indexed="true" stored="true" multiValued="true" docValues="true" />
<field name="building_facet" type="string" indexed="true" stored="true" multiValued="true" />
Expand Down Expand Up @@ -282,10 +285,12 @@
</fields>

<!-- copy fields -->
<copyField source="id" dest="id_search" />
<copyField source="collection" dest="collection_search" />
<copyField source="pub_date" dest="pub_date_search" />
<copyField source="db_az_subject" dest="db_az_subject_search" />

<copyField source="barcode_search" dest="item_barcodes_search" />
<copyField source="barcode_search" dest="item_barcodes" />
<!-- unstemmed and anchored search fields: title -->
<copyField source="title_245a_search" dest="title_245a_exact_search" />
<copyField source="title_245a_search" dest="title_245a_unstem_search" />
Expand Down
12 changes: 6 additions & 6 deletions config/solr_configs/solrconfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@
pub_date_search^2
isbn_search^1.6
issn_search^1.6
id
id_search
druid
oclc
barcode_search
item_barcodes_search
physical vern_physical
award_search
collection_search
Expand Down Expand Up @@ -489,9 +489,9 @@
pub_date_search^2
isbn_search^1.6
issn_search^1.6
id
id_search
oclc
barcode_search
items_barcode_search
physical vern_physical cjk_physical_search ja_physical_search
award_search
collection_search
Expand Down Expand Up @@ -926,11 +926,11 @@

<!-- for advanced search number text box -->
<str name="qf_number">
id
id_search
isbn_search
issn_search
oclc
barcode_search
items_barcode_search
callnum_search
</str>
<str name="pf_number">issn_search^5 callnum_search^5</str>
Expand Down

0 comments on commit e1c8ca3

Please sign in to comment.