diff --git a/index-alphabetic-browse.bat b/index-alphabetic-browse.bat index 893e0c8a36a1c34a2ee639979f6d96b65f2977bd..2b16e8f46e2371283c8dca36e637a1f5cbb871b1 100644 --- a/index-alphabetic-browse.bat +++ b/index-alphabetic-browse.bat @@ -59,6 +59,7 @@ if exist %index_dir% goto nomakeindexdir mkdir "%index_dir%" :nomakeindexdir +call %VUFIND_HOME%\index-alphabetic-browse.bat build_browse hierarchy hierarchy_browse call %VUFIND_HOME%\index-alphabetic-browse.bat build_browse title title_fullStr 1 "-Dbibleech=StoredFieldLeech -Dsortfield=title_sort -Dvaluefield=title_fullStr" call %VUFIND_HOME%\index-alphabetic-browse.bat build_browse topic topic_browse call %VUFIND_HOME%\index-alphabetic-browse.bat build_browse author author_browse diff --git a/index-alphabetic-browse.sh b/index-alphabetic-browse.sh index 19380969d459be039da8db6f88fe4355d8f79c3e..1aa95d5db1244091125ca45ba535e24c11c26a65 100755 --- a/index-alphabetic-browse.sh +++ b/index-alphabetic-browse.sh @@ -34,7 +34,7 @@ function build_browse mv "${browse}_browse.db" "$index_dir/${browse}_browse.db-updated" touch "$index_dir/${browse}_browse.db-ready" } - +build_browse "hierarchy" "hierarchy_browse" build_browse "title" "title_fullStr" 1 "-Dbibleech=StoredFieldLeech -Dsortfield=title_sort -Dvaluefield=title_fullStr" build_browse "topic" "topic_browse" build_browse "author" "author_browse" diff --git a/solr/biblio/conf/schema.xml b/solr/biblio/conf/schema.xml index e7ec375b603ed8024bdcc540ddf8f0a62c2005b9..205fc1ac2d4722311f83460d70f904a10b4ff506 100644 --- a/solr/biblio/conf/schema.xml +++ b/solr/biblio/conf/schema.xml @@ -9,6 +9,12 @@ <filter class="solr.PatternReplaceFilterFactory" pattern="(?<!\b[A-Z])[.\s]*$" replacement="" replace="first"/> </analyzer> </fieldType> + <fieldType name="textFacetRaw" class="solr.TextField" sortMissingLast="true" omitNorms="true"> + <analyzer> + <tokenizer class="solr.KeywordTokenizerFactory"/> + <!-- this is just like textFacet but without punctuation stripping. --> + </analyzer> + </fieldType> <fieldType name="text" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.ICUTokenizerFactory"/> @@ -185,6 +191,7 @@ <field name="hierarchy_sequence" type="string" indexed="true" stored="true" multiValued="true"/> <field name="is_hierarchy_id" type="string" indexed="true" stored="true" multiValued="false"/> <field name="is_hierarchy_title" type="string" indexed="true" stored="true" multiValued="false"/> + <field name="hierarchy_browse" type="textFacetRaw" indexed="true" stored="false" multiValued="true"/> <!-- Used for loading correct record driver --> <field name="recordtype" type="string" indexed="false" stored="true"/> <!-- Tracking fields to keep track of oldest and most recent index times --> diff --git a/solr/biblio/conf/solrconfig.xml b/solr/biblio/conf/solrconfig.xml index ef1d5df2ee1e4fa93898e89c51868f33aba1a1df..1c4180d1ff05c7bf2d5a872af15d3bf2d69910e5 100644 --- a/solr/biblio/conf/solrconfig.xml +++ b/solr/biblio/conf/solrconfig.xml @@ -469,7 +469,7 @@ <str name="scopeNoteField">scope_note</str> - <str name="sources">topic,author,title,lcc,dewey</str> + <str name="sources">topic,author,title,lcc,dewey,hierarchy</str> <lst name="topic"> <str name="DBpath">${solr.solr.home:./solr}/alphabetical_browse/topic_browse.db</str> @@ -497,6 +497,10 @@ <str name="ignoreDiacritics">yes</str> </lst> + <lst name="hierarchy"> + <str name="DBpath">${solr.solr.home:./solr}/alphabetical_browse/hierarchy_browse.db</str> + <str name="field">hierarchy_browse</str> + </lst> </requestHandler> <searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">