About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:adding_facets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
indexing:adding_facets [2015/12/14 17:12] – ↷ Page moved from adding_facets to indexing:adding_facets demiankatzindexing:adding_facets [2016/01/26 14:04] demiankatz
Line 1: Line 1:
-====== Facets ======+====== Adding Facets ======
  
  
Line 20: Line 20:
 In our example, the publishDate index is a custom index not pulled directly from a MARC tag.  The DateOfPublication custom indexing routine provided the date to the indexer, but we do not need to know how it does that to proceed.  We have identified that the index in question is called publishDate, which is all we need right now. In our example, the publishDate index is a custom index not pulled directly from a MARC tag.  The DateOfPublication custom indexing routine provided the date to the indexer, but we do not need to know how it does that to proceed.  We have identified that the index in question is called publishDate, which is all we need right now.
  
-The file [[facets.ini]] contains the lists of facets to be viewed.  Each line is a facet, in the form:+The file [[configuration:files:facets.ini]] contains the lists of facets to be viewed.  Each line is a facet, in the form:
  
    SolrIndexName = Facet Display Name    SolrIndexName = Facet Display Name
Line 79: Line 79:
 Of note:  The numbers in brackets indicate that the system should look at only the first two bytes in the 048 subfield a field (0-1 mean position 0 to position 1).  A comma separates the field information from the name of the file used to translate the data, in this case, instrument_map.properties. Of note:  The numbers in brackets indicate that the system should look at only the first two bytes in the 048 subfield a field (0-1 mean position 0 to position 1).  A comma separates the field information from the name of the file used to translate the data, in this case, instrument_map.properties.
  
-A line defining the new index must be added to Solr's schema.xml file (found in solr/biblio/conf under your VuFind installation) and a line for the new facet will be added to [[facets.ini]] (see above for instructions).+A line defining the new index must be added to Solr's schema.xml file (found in solr/biblio/conf under your VuFind installation) and a line for the new facet will be added to [[configuration:files:facets.ini]] (see above for instructions).
  
 +===== Troubleshooting =====
 +
 +==== string vs. text fields ====
 +
 +If you set up a facet field and see individual words instead of complete facet values, this most likely means that you have faceted on an analyzed field (usually of type "text" in [[development:architecture:solr_index_schema|VuFind's Solr schema]]). Solr faceting displays the terms stored in the index, not the original raw text provided at index-time. Thus, if you facet on an analyzed field that tokenizes and manipulates strings, strange facet values may appear to the end user. Most of the time, you only want to facet on simple string fields to avoid this problem. This is why the default schema includes some apparently duplicate values -- it is generally necessary to use different fields for search-oriented and facet-oriented tasks.
 ---- struct data ---- ---- struct data ----
 ---- ----
  
indexing/adding_facets.txt · Last modified: 2021/03/24 15:47 by emaijala