Dear Wiki user, You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The following page has been changed by TriciaWilliams: http://wiki.apache.org/solr/SolrPlugins The comment on the change is: added first cut at SearchComponent documentation (from Solr 1.3 solrconfig.xml) ------------------------------------------------------------------------------ === SearchComponent === <!> ["Solr1.3"] - /!\ :TODO: /!\ Need short description and config example + Instances of [http://lucene.apache.org/solr/api/org/apache/solr/handler/component/SearchComponent.html SearchComponent] define logic that is registered to !SolrCore and is executed by a given !SolrRequestHandler typically to supplement a result set. The following components are available by default: + {{{ + <searchComponent name="query" class="org.apache.solr.handler.component.QueryComponent" /> + <searchComponent name="facet" class="org.apache.solr.handler.component.FacetComponent" /> + <searchComponent name="mlt" class="org.apache.solr.handler.component.MoreLikeThisComponent" /> + <searchComponent name="highlight" class="org.apache.solr.handler.component.HighlightComponent" /> + <searchComponent name="debug" class="org.apache.solr.handler.component.DebugComponent" /> + }}} + + Multiple search components can be added to a given !SolrRequestHandler. Components and their configuration can be specified in your [wiki:SolrConfigXml solrconfig.xml]... + {{{ + <searchComponent name="elevator" class="org.apache.solr.handler.component.QueryElevationComponent" > + <!-- pick a fieldType to analyze queries --> + <str name="queryFieldType">string</str> + <str name="config-file">elevate.xml</str> + </searchComponent> + + <requestHandler name="/elevate" class="org.apache.solr.handler.component.SearchHandler" startup="lazy"> + <lst name="defaults"> + <str name="echoParams">explicit</str> + </lst> + <!-- + By default, this will register the following components: + + <arr name="components"> + <str>query</str> + <str>facet</str> + <str>mlt</str> + <str>highlight</str> + <str>debug</str> + </arr> + + To insert handlers before or after the 'standard' components, use: + + <arr name="first-components"> + <str>first</str> + </arr> + + We insert the elevator component after all the defaults + --> + <arr name="last-components"> + <str>elevator</str> + </arr> + </requestHandler> + }}} for more info, see: SearchComponent @@ -71, +115 @@ === Similarity === - The [http://lucene.apache.org/java/docs/api/org/apache/lucene/search/Similarity.html Similarity] class is a native lucene concept that determines how much of the score calculations for the various types of queries are executed. For more information on how the methods in the Similarity class are used, consult the [http://lucene.apache.org/java/docs/scoring.html Lucene scoring documentation]. If you wish to override the !DefaultSimilarity provided by Lucene, you can specify your own subclass in your [wiki:SchemaXml schema.xml]... + The [http://lucene.apache.org/java/docs/api/org/apache/lucene/search/Similarity.html Similarity] class is a native Lucene concept that determines how much of the score calculations for the various types of queries are executed. For more information on how the methods in the Similarity class are used, consult the [http://lucene.apache.org/java/docs/scoring.html Lucene scoring documentation]. If you wish to override the !DefaultSimilarity provided by Lucene, you can specify your own subclass in your [wiki:SchemaXml schema.xml]... {{{ <similarity class="my.package.CustomSimilarity"/> @@ -98, +142 @@ === Analyzer === - The [http://lucene.apache.org/java/docs/api/org/apache/lucene/analysis/Analyzer.html Analyzer] class is a native lucene concept that determines how tokens are produced from a piece of text. Solr allows Analyzers to be specified for each fieldtype in your [wiki:SchemaXml schema.xml] that uses the !TextField class -- and even allows for differnent Analyzers to be specified for indexing text as documents are added, and parsing text specified in a query... + The [http://lucene.apache.org/java/docs/api/org/apache/lucene/analysis/Analyzer.html Analyzer] class is a native Lucene concept that determines how tokens are produced from a piece of text. Solr allows Analyzers to be specified for each fieldtype in your [wiki:SchemaXml schema.xml] that uses the !TextField class -- and even allows for different Analyzers to be specified for indexing text as documents are added, and parsing text specified in a query... {{{ <fieldtype name="text_foo" class="solr.TextField"> @@ -110, +154 @@ </fieldType> }}} - Solr also provides a [http://lucene.apache.org/solr/docs/api/org/apache/solr/analysis/SolrAnalyzer.html SolrAnalyzer] base class which can be used if you want to write your own Analyzer and configure the "positionIncrimentGap" in your schema.xml... + Solr also provides a [http://lucene.apache.org/solr/docs/api/org/apache/solr/analysis/SolrAnalyzer.html SolrAnalyzer] base class which can be used if you want to write your own Analyzer and configure the "positionIncrementGap" in your schema.xml... {{{ <fieldtype name="text_baz" class="solr.TextField" positionIncrementGap="100"> @@ -118, +162 @@ </fieldType> }}} - Specifing an Analyzer class in your schema.xml makes a lot of sense if you already have an existing Analyzer you wish to use as is, but if you are planning to write Analysis code from scratch that you would like to use in Solr, you should keep reading the following sections... + Specifying an Analyzer class in your schema.xml makes a lot of sense if you already have an existing Analyzer you wish to use as is, but if you are planning to write Analysis code from scratch that you would like to use in Solr, you should keep reading the following sections... === Tokenizer and TokenFilter === @@ -203, +247 @@ 1. Constructor 2. ''init( Map / !NamedList )'' 3. ResourceLoaderAware classes call: ''inform( !ResourceLoader );'' - 3. Before the first request is made and after all plugns have been created and registered, SolrCoreAware pluggins call: ''inform( SolrCore );'' + 3. Before the first request is made and after all plugins have been created and registered, SolrCoreAware plugins call: ''inform( SolrCore );''
