Tx solrsearch
Version 36 (Ingo Renner, 2011-02-17 12:11)
| 1 | 1 | h1. tx_solr.search |
|
|---|---|---|---|
| 2 | 1 | ||
| 3 | 1 | The search section, you probably already guessed it, provides configuration options for the all things related to actually searching the index, setting query parameters, formatting and processing result documents and the result listing. |
|
| 4 | 1 | ||
| 5 | 3 | Ingo Renner | {{toc}} |
| 6 | 3 | Ingo Renner | |
| 7 | 5 | Stefan Sprenger | h2. filter |
| 8 | 6 | Stefan Sprenger | |
| 9 | 5 | Stefan Sprenger | *Since:* version:1.0 |
| 10 | 5 | Stefan Sprenger | *Default:* |
| 11 | 5 | Stefan Sprenger | *Type:* String |
| 12 | 5 | Stefan Sprenger | |
| 13 | 5 | Stefan Sprenger | Adds additional parameters to the search initialization. |
| 14 | 5 | Stefan Sprenger | |
| 15 | 5 | Stefan Sprenger | h2. targetPage |
| 16 | 6 | Stefan Sprenger | |
| 17 | 5 | Stefan Sprenger | *Since:* version:1.0 |
| 18 | 5 | Stefan Sprenger | *Default:* 0 |
| 19 | 5 | Stefan Sprenger | *Type:* Integer |
| 20 | 5 | Stefan Sprenger | |
| 21 | 5 | Stefan Sprenger | Sets the target page ID for links. If it is empty or 0, the current page ID will be used. |
| 22 | 5 | Stefan Sprenger | |
| 23 | 5 | Stefan Sprenger | h2. allowEmptyQuery |
| 24 | 6 | Stefan Sprenger | |
| 25 | 5 | Stefan Sprenger | *Since:* version:1.0 |
| 26 | 5 | Stefan Sprenger | *Default:* 0 |
| 27 | 5 | Stefan Sprenger | *Options:* 0,1 |
| 28 | 5 | Stefan Sprenger | *Type:* Boolean |
| 29 | 5 | Stefan Sprenger | |
| 30 | 5 | Stefan Sprenger | If enabled, empty queries are allowed. |
| 31 | 5 | Stefan Sprenger | |
| 32 | 3 | Ingo Renner | h1. query |
| 33 | 1 | ||
| 34 | 1 | The query sub-section defines a few query parameters for the query that will be sent to the Solr server later on. Some query parameters are also generated and set by the extension itself, f.e. when using facets. |
|
| 35 | 1 | ||
| 36 | 2 | Ingo Renner | h2. query.fields |
| 37 | 1 | ||
| 38 | 1 | *Since:* version:1.0 |
|
| 39 | 1 | *Default:* content^40.0, title^5.0, keywords^2.0, tagsH1^5.0, tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0 |
|
| 40 | 5 | Stefan Sprenger | *Type:* String |
| 41 | 1 | ||
| 42 | 1 | Defines what fields to search in the index. Fields are defined as a comma separated list. Each field can be given a boost by appending the boost value separated by the ^ character, that's Lucene query language. The boost value itself is a float value, pay attention to using a dot as the separator for the fractions. Use this option to add more fields to search. |
|
| 43 | 1 | ||
| 44 | 1 | The boost take influence on what score a document gets when searching and thus how documents are ranked and listed in the search results. A higher score will move documents up in the result listing. The boost is a multiplier for the original score value of a document for a search term. |
|
| 45 | 1 | ||
| 46 | 1 | By default if a search term is found in the content field the documents gets scored / ranked higher as if a term was found in the title or keywords field. Although the default should provide a good setting, you can play around with the boost values to find the best ranking for your content. |
|
| 47 | 1 | ||
| 48 | 1 | h2. query.minimumMatch |
|
| 49 | 1 | ||
| 50 | 21 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 51 | 1 | *Default:* (empty) |
|
| 52 | 1 | *See:* http://wiki.apache.org/solr/DisMaxRequestHandler#mm_.28Minimum_.27Should.27_Match.29 |
|
| 53 | 5 | Stefan Sprenger | *Type:* String |
| 54 | 1 | ||
| 55 | 1 | Sets the minimum match _mm_ query parameter. |
|
| 56 | 1 | By default the mm query parameter is set in solrconfig.xml as _2<-35%_. This means that for queries with less than three words they all must match the searched fields of a document. For queries with three or more words at least 65% of them must match rounded up. |
|
| 57 | 1 | ||
| 58 | 1 | Please consult the link to the Solr wiki for a more detailed description of the mm syntax. |
|
| 59 | 1 | ||
| 60 | 1 | h2. query.boostFunction |
|
| 61 | 1 | ||
| 62 | 21 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 63 | 1 | *Default:* (empty) |
|
| 64 | 7 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/DisMaxRequestHandler#bf_.28Boost_Functions.29 |
| 65 | 7 | Stefan Sprenger | *Type:* String |
| 66 | 7 | Stefan Sprenger | |
| 67 | 7 | Stefan Sprenger | Sets the boost function _bf_ query parameter. |
| 68 | 7 | Stefan Sprenger | Allows to further manipulate the score of a document by using mathematical functions and field values of the current document. |
| 69 | 7 | Stefan Sprenger | A common use case for boost functions is to rank newer documents higher than older ones. |
| 70 | 7 | Stefan Sprenger | |
| 71 | 7 | Stefan Sprenger | Please consult the link to the Solr wiki for a more detailed description of boost functions. |
| 72 | 7 | Stefan Sprenger | |
| 73 | 7 | Stefan Sprenger | h1. results |
| 74 | 7 | Stefan Sprenger | |
| 75 | 7 | Stefan Sprenger | h2. results.resultsPerPage |
| 76 | 7 | Stefan Sprenger | |
| 77 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 78 | 7 | Stefan Sprenger | *Default:* {$plugin.tx_solr.search.results.resultsPerPage} |
| 79 | 7 | Stefan Sprenger | *Type:* Integer |
| 80 | 7 | Stefan Sprenger | |
| 81 | 7 | Stefan Sprenger | Sets the number of shown results per page. |
| 82 | 7 | Stefan Sprenger | |
| 83 | 7 | Stefan Sprenger | h2. results.resultsPerPageSwitchOptions |
| 84 | 7 | Stefan Sprenger | |
| 85 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 86 | 7 | Stefan Sprenger | *Default:* 10, 20, 30, 50 |
| 87 | 7 | Stefan Sprenger | *Type:* String |
| 88 | 7 | Stefan Sprenger | |
| 89 | 7 | Stefan Sprenger | Defines the shown options of possible results per page. |
| 90 | 7 | Stefan Sprenger | |
| 91 | 7 | Stefan Sprenger | h2. results.fieldProcessingInstructions |
| 92 | 7 | Stefan Sprenger | |
| 93 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 94 | 18 | Markus Goldbach | *Options:* timestamp, utf8Decode, skip |
| 95 | 7 | Stefan Sprenger | *Type:* cObject |
| 96 | 7 | Stefan Sprenger | |
| 97 | 7 | Stefan Sprenger | Mapping of fieldname to processing instructions. Available instructions: timestamp, utf8Decode, skip (removes the field from the result). |
| 98 | 7 | Stefan Sprenger | |
| 99 | 7 | Stefan Sprenger | h2. results.fieldRenderingInstructions |
| 100 | 7 | Stefan Sprenger | |
| 101 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 102 | 7 | Stefan Sprenger | *Type:* cObject |
| 103 | 7 | Stefan Sprenger | |
| 104 | 7 | Stefan Sprenger | Additional rendering instructions for specified fields. |
| 105 | 7 | Stefan Sprenger | |
| 106 | 7 | Stefan Sprenger | h2. results.pagebrowser.templateFile |
| 107 | 7 | Stefan Sprenger | |
| 108 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 109 | 7 | Stefan Sprenger | *Default:* EXT:solr/resources/templates/pi_results/pagebrowser.htm |
| 110 | 7 | Stefan Sprenger | *Type:* String |
| 111 | 7 | Stefan Sprenger | |
| 112 | 7 | Stefan Sprenger | Defines the template used for the pagebrowser. |
| 113 | 7 | Stefan Sprenger | |
| 114 | 7 | Stefan Sprenger | h2. results.ignorePageBrowser |
| 115 | 7 | Stefan Sprenger | |
| 116 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 117 | 7 | Stefan Sprenger | *Default:* 0 |
| 118 | 21 | Ingo Renner | *Options:* 0, 1 |
| 119 | 7 | Stefan Sprenger | *Type:* Boolean |
| 120 | 7 | Stefan Sprenger | |
| 121 | 7 | Stefan Sprenger | If enabled, the selected page will be ignored an results by the first record. |
| 122 | 7 | Stefan Sprenger | |
| 123 | 7 | Stefan Sprenger | h2. results.showDocumentScoreAnalysis |
| 124 | 7 | Stefan Sprenger | |
| 125 | 7 | Stefan Sprenger | *Since:* version:2.0 |
| 126 | 1 | *Default:* 0 |
|
| 127 | 1 | *Options:* 0,1 |
|
| 128 | 1 | *Type:* Boolean |
|
| 129 | 1 | ||
| 130 | 1 | If enabled, the analysis and display of the score analysis for logged in backend users will be initialized. |
|
| 131 | 1 | ||
| 132 | 1 | h1. highlighting |
|
| 133 | 1 | ||
| 134 | 34 | Ingo Renner | h2. highlighting |
| 135 | 34 | Ingo Renner | |
| 136 | 34 | Ingo Renner | *Since:* version:1.0 |
| 137 | 34 | Ingo Renner | *Default:* 0 |
| 138 | 34 | Ingo Renner | *Type:* Boolean |
| 139 | 34 | Ingo Renner | |
| 140 | 34 | Ingo Renner | Set @plugin.tx_solr.highlighting = 1@ to enable search term highlighting. |
| 141 | 34 | Ingo Renner | |
| 142 | 9 | Stefan Sprenger | h2. highlighting.highlightFields |
| 143 | 9 | Stefan Sprenger | |
| 144 | 9 | Stefan Sprenger | *Since:* version:1.0 |
| 145 | 9 | Stefan Sprenger | *Default:* title,content |
| 146 | 9 | Stefan Sprenger | *Type:* String |
| 147 | 9 | Stefan Sprenger | |
| 148 | 9 | Stefan Sprenger | Should be a comma- or space-delimited list of fields to generate highlighted snippets for. |
| 149 | 10 | Stefan Sprenger | |
| 150 | 10 | Stefan Sprenger | h2. highlighting.fragmentSize |
| 151 | 10 | Stefan Sprenger | |
| 152 | 10 | Stefan Sprenger | *Since:* version:1.0 |
| 153 | 10 | Stefan Sprenger | *Default:* 200 |
| 154 | 10 | Stefan Sprenger | *Type:* Integer |
| 155 | 10 | Stefan Sprenger | |
| 156 | 10 | Stefan Sprenger | The size, in characters, of fragments to consider for highlighting. "0" indicates that the whole field value should be used (no fragmenting). |
| 157 | 10 | Stefan Sprenger | |
| 158 | 10 | Stefan Sprenger | h2. highlighting.wrap |
| 159 | 10 | Stefan Sprenger | |
| 160 | 1 | *Since:* version:1.0 |
|
| 161 | 1 | *Default:* <span class="results-highlight">|</span> |
|
| 162 | 1 | *Type:* String |
|
| 163 | 1 | ||
| 164 | 1 | This is used to format the highlighted parts. |
|
| 165 | 1 | ||
| 166 | 1 | h1. spellchecking |
|
| 167 | 1 | ||
| 168 | 34 | Ingo Renner | h2. spellchecking |
| 169 | 34 | Ingo Renner | |
| 170 | 34 | Ingo Renner | *Since:* version:1.0 |
| 171 | 34 | Ingo Renner | *Default:* 0 |
| 172 | 34 | Ingo Renner | *Type:* Boolean |
| 173 | 34 | Ingo Renner | |
| 174 | 34 | Ingo Renner | Set @plugin.tx_solr.spellchecking = 1@ to enable spellchecking / did you mean. |
| 175 | 34 | Ingo Renner | |
| 176 | 10 | Stefan Sprenger | h2. spellchecking.wrap |
| 177 | 10 | Stefan Sprenger | |
| 178 | 1 | *Since:* version:1.0 |
|
| 179 | 1 | *Default:* |<div class="spelling-suggestions">###LLL:didYouMean### |</div>| |
|
| 180 | 1 | *Type:* String |
|
| 181 | 1 | ||
| 182 | 1 | This is used to format spelling suggestions. |
|
| 183 | 1 | ||
| 184 | 1 | h1. lastSearches |
|
| 185 | 1 | ||
| 186 | 34 | Ingo Renner | h2. lastSearches |
| 187 | 34 | Ingo Renner | |
| 188 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 189 | 34 | Ingo Renner | *Default:* 0 |
| 190 | 34 | Ingo Renner | *Type:* Boolean |
| 191 | 34 | Ingo Renner | |
| 192 | 34 | Ingo Renner | Set @plugin.tx_solr.lastSearches = 1@ to display a list of the last searches. |
| 193 | 34 | Ingo Renner | |
| 194 | 1 | h2. lastSearches.limit |
|
| 195 | 10 | Stefan Sprenger | |
| 196 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 197 | 10 | Stefan Sprenger | *Default:* 10 |
| 198 | 10 | Stefan Sprenger | *Type:* Integer |
| 199 | 10 | Stefan Sprenger | |
| 200 | 10 | Stefan Sprenger | Defines the number of last searches, that should get minded. |
| 201 | 10 | Stefan Sprenger | |
| 202 | 10 | Stefan Sprenger | h2. lastSearches.mode |
| 203 | 1 | ||
| 204 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 205 | 1 | *Default:* user |
|
| 206 | 1 | *Options:* user, global |
|
| 207 | 1 | *Type:* String |
|
| 208 | 1 | ||
| 209 | 1 | If mode is user, keywords will get stored into the session. If mode is global keywords will get stored into the database. |
|
| 210 | 1 | ||
| 211 | 10 | Stefan Sprenger | h1. commonTerms |
| 212 | 1 | ||
| 213 | 34 | Ingo Renner | h2. commonTerms |
| 214 | 34 | Ingo Renner | |
| 215 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 216 | 34 | Ingo Renner | *Default:* 0 |
| 217 | 34 | Ingo Renner | *Type:* Boolean |
| 218 | 34 | Ingo Renner | |
| 219 | 34 | Ingo Renner | Set @plugin.tx_solr.commonTerms = 1@ to display a list of the frequent / common searches. |
| 220 | 34 | Ingo Renner | |
| 221 | 11 | Stefan Sprenger | h2. commonTerms.minSize |
| 222 | 11 | Stefan Sprenger | |
| 223 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 224 | 11 | Stefan Sprenger | *Default:* 14 |
| 225 | 11 | Stefan Sprenger | *Type:* Integer |
| 226 | 11 | Stefan Sprenger | |
| 227 | 1 | The difference between commonTerms.maxSize and commonTerms.minsize is getting used for calculating the current step. |
|
| 228 | 11 | Stefan Sprenger | |
| 229 | 11 | Stefan Sprenger | |
| 230 | 11 | Stefan Sprenger | h2. commonTerms.maxSize |
| 231 | 11 | Stefan Sprenger | |
| 232 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 233 | 1 | *Default:* 32 |
|
| 234 | 1 | *Type:* Integer |
|
| 235 | 11 | Stefan Sprenger | |
| 236 | 11 | Stefan Sprenger | The difference between commonTerms.maxSize and commonTerms.minsize is getting used for calculating the current step. |
| 237 | 11 | Stefan Sprenger | |
| 238 | 11 | Stefan Sprenger | h2. commonTerms.limit |
| 239 | 12 | Stefan Sprenger | |
| 240 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 241 | 1 | *Default:* 20 |
|
| 242 | 1 | *Type:* Integer |
|
| 243 | 1 | ||
| 244 | 1 | Defines the maximum size of the list by commonTerms.select. |
|
| 245 | 1 | ||
| 246 | 1 | h2. commonTerms.select |
|
| 247 | 1 | ||
| 248 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 249 | 11 | Stefan Sprenger | *Type:* cObject |
| 250 | 11 | Stefan Sprenger | |
| 251 | 11 | Stefan Sprenger | Defines a database connection for retrieving statistics. |
| 252 | 11 | Stefan Sprenger | |
| 253 | 11 | Stefan Sprenger | h1. sorting |
| 254 | 11 | Stefan Sprenger | |
| 255 | 34 | Ingo Renner | h2. sorting |
| 256 | 34 | Ingo Renner | |
| 257 | 34 | Ingo Renner | *Since:* version:1.0 |
| 258 | 34 | Ingo Renner | *Default:* 0 |
| 259 | 34 | Ingo Renner | *Type:* Boolean |
| 260 | 34 | Ingo Renner | |
| 261 | 34 | Ingo Renner | Set @plugin.tx_solr.sorting = 1@ to allow sorting of results. |
| 262 | 34 | Ingo Renner | |
| 263 | 11 | Stefan Sprenger | h2. sorting.defaultOrder |
| 264 | 11 | Stefan Sprenger | |
| 265 | 12 | Stefan Sprenger | *Since:* version:1.0 |
| 266 | 11 | Stefan Sprenger | *Default:* ASC |
| 267 | 11 | Stefan Sprenger | *Options:* ASC, DESC |
| 268 | 11 | Stefan Sprenger | *Type:* String |
| 269 | 11 | Stefan Sprenger | |
| 270 | 11 | Stefan Sprenger | Sets the order of sortings. |
| 271 | 11 | Stefan Sprenger | |
| 272 | 11 | Stefan Sprenger | h2. sorting.fields |
| 273 | 12 | Stefan Sprenger | |
| 274 | 34 | Ingo Renner | This is a list of fields configured to be used for sorting. Each field has a label to be used, the label more specifically is a LLL key. By default the fields sortTitle, type, sortAuthor, and created are configured, plus the virtual relevancy field which is used for sorting by default. |
| 275 | 11 | Stefan Sprenger | |
| 276 | 34 | Ingo Renner | h3. sorting.fields.[sortField].label |
| 277 | 11 | Stefan Sprenger | |
| 278 | 11 | Stefan Sprenger | *Since:* version:1.0 |
| 279 | 11 | Stefan Sprenger | *Type:* String |
| 280 | 11 | Stefan Sprenger | |
| 281 | 34 | Ingo Renner | Defines the name of the field's label. |
| 282 | 13 | Stefan Sprenger | |
| 283 | 13 | Stefan Sprenger | h1. faceting |
| 284 | 13 | Stefan Sprenger | |
| 285 | 13 | Stefan Sprenger | h2. faceting.minimumCount |
| 286 | 13 | Stefan Sprenger | |
| 287 | 13 | Stefan Sprenger | *Since:* version:1.0 |
| 288 | 13 | Stefan Sprenger | *Default:* 1 |
| 289 | 13 | Stefan Sprenger | *Type:* Integer |
| 290 | 13 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/SimpleFacetParameters#facet.mincount |
| 291 | 13 | Stefan Sprenger | |
| 292 | 13 | Stefan Sprenger | This indicates the minimum counts for facet fields should be included in the response. |
| 293 | 13 | Stefan Sprenger | |
| 294 | 13 | Stefan Sprenger | h2. faceting.sortBy |
| 295 | 13 | Stefan Sprenger | |
| 296 | 13 | Stefan Sprenger | *Since:* version:1.0 |
| 297 | 13 | Stefan Sprenger | *Default:* count |
| 298 | 20 | Ingo Renner | *Options:* count, index, 1, 0, true, false, alpha (version:1.2, version:2.0), lex (version:1.2, version:2.0) |
| 299 | 13 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/SimpleFacetParameters#facet.sort |
| 300 | 13 | Stefan Sprenger | *Type:* String |
| 301 | 1 | ||
| 302 | 16 | Ingo Renner | Defines how facet options are sorted, by default they are sorted by count of results, highest on top. count, 1, true are aliases for each other. |
| 303 | 20 | Ingo Renner | Facet options can also be sorted alphabetically (lexicographic by indexed term) by setting the option to index. index, 0, false, alpha (from version version:1.2 and version:2.0), and lex (from version version:1.2 and version:2.0) are aliases for index. |
| 304 | 13 | Stefan Sprenger | |
| 305 | 13 | Stefan Sprenger | h2. faceting.limit |
| 306 | 13 | Stefan Sprenger | |
| 307 | 13 | Stefan Sprenger | *Since:* version:1.0 |
| 308 | 13 | Stefan Sprenger | *Default:* 10 |
| 309 | 13 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit |
| 310 | 13 | Stefan Sprenger | *Type:* Integer |
| 311 | 13 | Stefan Sprenger | |
| 312 | 13 | Stefan Sprenger | This indicates the maximum number of constraint counts that should be returned for the facet fields. A negative value means unlimited. |
| 313 | 13 | Stefan Sprenger | |
| 314 | 13 | Stefan Sprenger | h2. faceting.singleFacetMode |
| 315 | 13 | Stefan Sprenger | |
| 316 | 27 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 317 | 13 | Stefan Sprenger | *Default:* 0 |
| 318 | 21 | Ingo Renner | *Options:* 0, 1 |
| 319 | 13 | Stefan Sprenger | *Type:* Boolean |
| 320 | 1 | ||
| 321 | 27 | Ingo Renner | If enabled, the user can only use one facet at a time. |
| 322 | 27 | Ingo Renner | |
| 323 | 27 | Ingo Renner | Lets say you have you have two facets configured, type and author. If the user selects a facet option from type its filter is added to the query. Normally when selecting another option from the other facet - the author facet - this would lead to having two facet filters applied to the query. When this option is activated the option from the author facet will simply replace the first option from the type facet. |
| 324 | 13 | Stefan Sprenger | |
| 325 | 31 | Ingo Renner | h2. faceting.removeFacetLinkText |
| 326 | 31 | Ingo Renner | |
| 327 | 31 | Ingo Renner | *Since:* version:1.0 |
| 328 | 31 | Ingo Renner | *Default:* @facetText (remove) |
| 329 | 31 | Ingo Renner | *Type:* String |
| 330 | 31 | Ingo Renner | |
| 331 | 31 | Ingo Renner | Defines the text for a link used for removing a given facet from the search results. |
| 332 | 31 | Ingo Renner | |
| 333 | 31 | Ingo Renner | h2. faceting.showAllLink.wrap |
| 334 | 31 | Ingo Renner | |
| 335 | 31 | Ingo Renner | *Since:* version:1.0 |
| 336 | 31 | Ingo Renner | *Default:* <li>|</li> |
| 337 | 31 | Ingo Renner | *Type:* String |
| 338 | 31 | Ingo Renner | |
| 339 | 31 | Ingo Renner | Defines the output of the "Show more" link, that is rendered if there are more facets given than set by faceting.limit. |
| 340 | 31 | Ingo Renner | |
| 341 | 31 | Ingo Renner | h2. faceting.showEmptyFacets |
| 342 | 31 | Ingo Renner | |
| 343 | 31 | Ingo Renner | *Since:* version:1.3 |
| 344 | 31 | Ingo Renner | *Default:* 1 |
| 345 | 31 | Ingo Renner | *Options:* 0, 1 |
| 346 | 31 | Ingo Renner | *Type:* Boolean |
| 347 | 31 | Ingo Renner | |
| 348 | 31 | Ingo Renner | By setting this option to 0, you can prevent rendering of empty facets. |
| 349 | 31 | Ingo Renner | |
| 350 | 13 | Stefan Sprenger | h2. faceting.facets |
| 351 | 13 | Stefan Sprenger | |
| 352 | 13 | Stefan Sprenger | *Since:* version:1.0 |
| 353 | 13 | Stefan Sprenger | *Default:* type, author |
| 354 | 13 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/SolrFacetingOverview |
| 355 | 13 | Stefan Sprenger | *Type:* cObject |
| 356 | 13 | Stefan Sprenger | |
| 357 | 14 | Ingo Renner | Defines on which fields you want to facet. It's a list of facet configurations. |
| 358 | 14 | Ingo Renner | |
| 359 | 14 | Ingo Renner | <pre><code class="typoscript"> |
| 360 | 14 | Ingo Renner | plugin.tx_solr.search.faceting.facets { |
| 361 | 14 | Ingo Renner | // type is the name of the facet configuration, you can choose whatever name |
| 362 | 14 | Ingo Renner | type { |
| 363 | 14 | Ingo Renner | field = type // the index field you want to create a facet from |
| 364 | 14 | Ingo Renner | label = Content Type // a label |
| 365 | 14 | Ingo Renner | sortBy = index // sorte the facet options alphabetically, otherwise they are sorted by count, options with more results on top |
| 366 | 14 | Ingo Renner | |
| 367 | 14 | Ingo Renner | keepAllOptionsOnSelection = 1 // if set allows to choose more than one option from this facet |
| 368 | 14 | Ingo Renner | operator = OR // used in combination with keepAllOptionsOnSelection to set how multiple options from one facet are combined, can also be AND |
| 369 | 14 | Ingo Renner | selectingSelectedFacetOptionRemovesFilter = 1 // boolean; if enabled, the facet options behave like switches. On first selection they add the filter for the facet option, on a second click they will remove the filter again. Currently requires keepAllOptionsOnSelection to be set to use this. |
| 370 | 14 | Ingo Renner | } |
| 371 | 15 | Ingo Renner | |
| 372 | 15 | Ingo Renner | myOtherFacet { |
| 373 | 1 | ... |
|
| 374 | 1 | } |
|
| 375 | 1 | } |
|
| 376 | 1 | </code></pre> |
|
| 377 | 21 | Ingo Renner | |
| 378 | 35 | Ingo Renner | h2. faceting.facets.[facetName] - single facet configuration |
| 379 | 1 | ||
| 380 | 24 | Ingo Renner | You can add new facets by simply adding a new facet configuration in TypoScript. [facet] represents the facet's name and acts as a configuration "container" for a single facet. All configuration options for that facet are defined within that "container". |
| 381 | 24 | Ingo Renner | |
| 382 | 24 | Ingo Renner | A facet will use the values of a configured index field to offer these values as filter options to your site's visitors. You need to make sure that the facet field's type allows to sort the field's value; like string, int, and other primitive types. |
| 383 | 24 | Ingo Renner | |
| 384 | 35 | Ingo Renner | h3. faceting.facets.[facetName].field |
| 385 | 24 | Ingo Renner | |
| 386 | 24 | Ingo Renner | *Since:* version:1.0 |
| 387 | 24 | Ingo Renner | *Type:* String |
| 388 | 24 | Ingo Renner | *Required* |
| 389 | 24 | Ingo Renner | |
| 390 | 24 | Ingo Renner | Which field to use to create the facet. |
| 391 | 24 | Ingo Renner | |
| 392 | 35 | Ingo Renner | h3. faceting.facets.[facetName].label |
| 393 | 24 | Ingo Renner | |
| 394 | 24 | Ingo Renner | *Since:* version:1.0 |
| 395 | 24 | Ingo Renner | *Type:* String |
| 396 | 24 | Ingo Renner | *Required* |
| 397 | 24 | Ingo Renner | |
| 398 | 24 | Ingo Renner | Used as a headline or title to describe the options of a facet. |
| 399 | 24 | Ingo Renner | |
| 400 | 35 | Ingo Renner | h3. faceting.facets.[facetName].selectingSelectedFacetOptionRemovesFilter |
| 401 | 23 | Ingo Renner | |
| 402 | 21 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 403 | 21 | Ingo Renner | *Default:* 0 |
| 404 | 21 | Ingo Renner | *Options:* 0, 1 |
| 405 | 21 | Ingo Renner | *Type:* Boolean |
| 406 | 21 | Ingo Renner | |
| 407 | 21 | Ingo Renner | Activating this option for a facet makes the facet's option links behave like on/off switches: You click them once to activate a facet, you click them a second time to deactivate the facet again. |
| 408 | 22 | Ingo Renner | |
| 409 | 1 | Feel free to suggest a better name for this option... |
|
| 410 | 22 | Ingo Renner | |
| 411 | 35 | Ingo Renner | h3. faceting.facets.[facetName].keepAllOptionsOnSelection |
| 412 | 22 | Ingo Renner | |
| 413 | 22 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 414 | 22 | Ingo Renner | *Default:* 0 |
| 415 | 22 | Ingo Renner | *Options:* 0, 1 |
| 416 | 22 | Ingo Renner | *Type:* Boolean |
| 417 | 22 | Ingo Renner | |
| 418 | 22 | Ingo Renner | Normally, when clicking any option link of a facet this would result in only that one option being displayed afterwards. By setting this option to one, you can prevent this. All options will still be displayed. |
| 419 | 22 | Ingo Renner | |
| 420 | 22 | Ingo Renner | This is useful if you want to allow the user to select more than one option from a single facet. |
| 421 | 22 | Ingo Renner | |
| 422 | 35 | Ingo Renner | h3. faceting.facets.[facetName].singleOptionMode |
| 423 | 32 | Ingo Renner | |
| 424 | 32 | Ingo Renner | *Since:* version:1.3, version:2.0 |
| 425 | 32 | Ingo Renner | *Default:* 0 |
| 426 | 32 | Ingo Renner | *Options:* 0, 1 |
| 427 | 32 | Ingo Renner | *Type:* Boolean |
| 428 | 32 | Ingo Renner | |
| 429 | 32 | Ingo Renner | When enabled together with keepAllOptionsOnSelection a user can select one option of the facet only at a time. Selecting a different option than the currently selected option results in the new option to replace the old one. The behavior thus is similar to a select box or a set of radio buttons. |
| 430 | 32 | Ingo Renner | |
| 431 | 33 | Ingo Renner | This option can not be used together with selectingSelectedFacetOptionRemovesFilter as it overrides its behavior. |
| 432 | 33 | Ingo Renner | |
| 433 | 32 | Ingo Renner | |
| 434 | 35 | Ingo Renner | h3. faceting.facets.[facetName].operator |
| 435 | 25 | Ingo Renner | |
| 436 | 25 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 437 | 25 | Ingo Renner | *Default:* AND |
| 438 | 25 | Ingo Renner | *Options:* OR, AND |
| 439 | 25 | Ingo Renner | *Type:* String |
| 440 | 25 | Ingo Renner | |
| 441 | 25 | Ingo Renner | When configuring a facet to allow selection of multiple options, you can use this option to decide whether multiple selected options should be combined using AND or OR. |
| 442 | 25 | Ingo Renner | |
| 443 | 36 | Ingo Renner | h3. faceting.facets.[facetName].includeInAvailableFacets |
| 444 | 29 | Stefan Sprenger | |
| 445 | 29 | Stefan Sprenger | *Since:* version:1.3 |
| 446 | 29 | Stefan Sprenger | *Default:* 1 |
| 447 | 29 | Stefan Sprenger | *Options:* 0, 1 |
| 448 | 29 | Stefan Sprenger | *Type:* Boolean |
| 449 | 29 | Stefan Sprenger | |
| 450 | 29 | Stefan Sprenger | By setting this option to 0, you can prevent rendering of a given facet within the available facets list. |
| 451 | 29 | Stefan Sprenger | This is pretty helpful if you render the facet yourself using a view helper and don't want the facet to be rendered twice. |
| 452 | 29 | Stefan Sprenger | |
| 453 | 35 | Ingo Renner | h3. faceting.facets.[facetName].renderingInstruction |
| 454 | 28 | Ingo Renner | |
| 455 | 28 | Ingo Renner | *Since:* version:1.0 |
| 456 | 28 | Ingo Renner | *Type:* cObject |
| 457 | 28 | Ingo Renner | |
| 458 | 28 | Ingo Renner | Overwrites how single facet options are rendered using TypoScript cObjects. |
| 459 | 28 | Ingo Renner | |
| 460 | 28 | Ingo Renner | Example: (taken from issue #5920) |
| 461 | 28 | Ingo Renner | <pre><code class="typoscript"> |
| 462 | 28 | Ingo Renner | plugin.tx_solr { |
| 463 | 28 | Ingo Renner | search { |
| 464 | 28 | Ingo Renner | faceting { |
| 465 | 28 | Ingo Renner | facets { |
| 466 | 28 | Ingo Renner | type { |
| 467 | 28 | Ingo Renner | renderingInstruction = CASE |
| 468 | 28 | Ingo Renner | renderingInstruction { |
| 469 | 28 | Ingo Renner | key.field = optionValue |
| 470 | 28 | Ingo Renner | |
| 471 | 28 | Ingo Renner | pages = TEXT |
| 472 | 28 | Ingo Renner | pages.value = Pages |
| 473 | 28 | Ingo Renner | pages.lang.de = Seiten |
| 474 | 28 | Ingo Renner | |
| 475 | 28 | Ingo Renner | file = TEXT |
| 476 | 28 | Ingo Renner | file.value = Files |
| 477 | 28 | Ingo Renner | file.lang.de = Dateien |
| 478 | 28 | Ingo Renner | |
| 479 | 28 | Ingo Renner | tt_news = TEXT |
| 480 | 13 | Stefan Sprenger | tt_news.value = News |
| 481 | 13 | Stefan Sprenger | tt_news.lang.de = Nachrichten |
| 482 | 13 | Stefan Sprenger | } |
| 483 | 13 | Stefan Sprenger | } |
| 484 | 13 | Stefan Sprenger | |
| 485 | 13 | Stefan Sprenger | language { |
| 486 | 13 | Stefan Sprenger | renderingInstruction = CASE |
| 487 | 13 | Stefan Sprenger | renderingInstruction { |
| 488 | 13 | Stefan Sprenger | key.field = optionValue |
| 489 | 13 | Stefan Sprenger | |
| 490 | 13 | Stefan Sprenger | 0 = TEXT |
| 491 | 13 | Stefan Sprenger | 0.value = English |
| 492 | 13 | Stefan Sprenger | 0.lang.de = Englisch |
| 493 | 13 | Stefan Sprenger | |
| 494 | 13 | Stefan Sprenger | 1 = TEXT |
| 495 | 30 | Stefan Sprenger | 1.value = German |
| 496 | 30 | Stefan Sprenger | 1.lang.de = Deutsch |
| 497 | 30 | Stefan Sprenger | } |
| 498 | 30 | Stefan Sprenger | } |
| 499 | 30 | Stefan Sprenger | } |
| 500 | 30 | Stefan Sprenger | } |
| 501 | 30 | Stefan Sprenger | } |
| 502 | 30 | Stefan Sprenger | } |
| 503 | 30 | Stefan Sprenger | </code></pre> |