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.
configuration:solr_shards

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
configuration:solr_shards [2023/10/17 12:51] demiankatzconfiguration:solr_shards [2023/10/17 12:52] (current) – [StripFields] demiankatz
Line 29: Line 29:
 If one index has a field another sharded index has not AND if this field is used in searchspecs.yaml or as a facet (in facets.ini), you might get into some trouble. In this case, any query will fail and will return no results. One solution for that is using the //StripFields// option in searches.ini (or to cut the facet from facets.ini). With //StripFields// you can remove fields defined in searchspecs.yaml from your query, if a certain shard is being used. **But be warned**: the results will be different from a query in one single shard, because the stripped field will not be used in the query. One more confusion with that: This is only true for extended search (i.e. if one uses truncation or special search operations avoiding VuFind® to use Dismax). Dismax currently does not care about missing fields and different schemas. If one index has a field another sharded index has not AND if this field is used in searchspecs.yaml or as a facet (in facets.ini), you might get into some trouble. In this case, any query will fail and will return no results. One solution for that is using the //StripFields// option in searches.ini (or to cut the facet from facets.ini). With //StripFields// you can remove fields defined in searchspecs.yaml from your query, if a certain shard is being used. **But be warned**: the results will be different from a query in one single shard, because the stripped field will not be used in the query. One more confusion with that: This is only true for extended search (i.e. if one uses truncation or special search operations avoiding VuFind® to use Dismax). Dismax currently does not care about missing fields and different schemas.
  
-To avoid that kind of trouble, you could consider to use sharding in a different way and to split shard results into separate tabs (each tab containing a result from only one shard). Or you could make all indices involved in sharding completely similarly structured.  One useful strategy for allowing flexibility without creating incompatible schemas is to use dynamic field definitions for custom fields.  As of version 1.3, VuFind® includes several dynamic field types by default -- see [[http://vufind.org/jira/browse/VUFIND-480|VUFIND-480]].+To avoid that kind of trouble, you could consider to use sharding in a different way and to split shard results into separate tabs (each tab containing a result from only one shard). Or you could make all indices involved in sharding completely similarly structured.  One useful strategy for allowing flexibility without creating incompatible schemas is to use [[development:architecture:solr_index_schema#dynamic_field_suffixes|dynamic field definitions]] for custom fields.
  
 ==== Sorting ==== ==== Sorting ====
configuration/solr_shards.1697547062.txt.gz · Last modified: 2023/10/17 12:51 by demiankatz