Tx solrsearch
Version 52 (Ingo Renner, 2011-08-29 10:49)
| 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 | 38 | Ingo Renner | h2. initializeWithEmptyQuery |
| 24 | 38 | Ingo Renner | |
| 25 | 38 | Ingo Renner | *Since:* version:1.4 |
| 26 | 38 | Ingo Renner | *Default:* 0 |
| 27 | 38 | Ingo Renner | *Options:* 0,1 |
| 28 | 38 | Ingo Renner | *Type:* Boolean |
| 29 | 38 | Ingo Renner | |
| 30 | 38 | Ingo Renner | If enabled, the results plugin (pi_results) issues a "get everything" query during initialization. This is useful, if you want to create a page that shows all available facets although no search has been issued by the user yet. Note: Enabling this option alone will not show results of the get everything query. To also show the results of the query, see option showResultsOfInitialEmptyQuery below. |
| 31 | 38 | Ingo Renner | |
| 32 | 39 | Ingo Renner | h2. showResultsOfInitialEmptyQuery |
| 33 | 39 | Ingo Renner | |
| 34 | 39 | Ingo Renner | *Since:* version:1.4 |
| 35 | 1 | *Default:* 0 |
|
| 36 | 1 | *Options:* 0,1 |
|
| 37 | 1 | *Type:* Boolean |
|
| 38 | 1 | ||
| 39 | 1 | Requires initializeWithEmptyQuery (above) to be enabled to have any effect. If enabled together with initializeWithEmptyQuery the results of the initial "get everything" query are shown. This way, in combination with a filter you can easily list a predefined set of results. |
|
| 40 | 1 | ||
| 41 | 1 | h1. query |
|
| 42 | 1 | ||
| 43 | 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. |
|
| 44 | 41 | Ingo Renner | |
| 45 | 42 | Ingo Renner | h2. query.allowEmptyQuery |
| 46 | 41 | Ingo Renner | |
| 47 | 41 | Ingo Renner | *Since:* version:1.4 |
| 48 | 41 | Ingo Renner | *Default:* 0 |
| 49 | 41 | Ingo Renner | *Options:* 0,1 |
| 50 | 41 | Ingo Renner | *Type:* Boolean |
| 51 | 41 | Ingo Renner | |
| 52 | 41 | Ingo Renner | If enabled, empty queries are allowed. |
| 53 | 1 | ||
| 54 | 2 | Ingo Renner | h2. query.fields |
| 55 | 1 | ||
| 56 | 1 | *Since:* version:1.0 |
|
| 57 | 1 | *Default:* content^40.0, title^5.0, keywords^2.0, tagsH1^5.0, tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0 |
|
| 58 | 5 | Stefan Sprenger | *Type:* String |
| 59 | 1 | ||
| 60 | 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. |
|
| 61 | 1 | ||
| 62 | 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. |
|
| 63 | 1 | ||
| 64 | 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. |
|
| 65 | 1 | ||
| 66 | 1 | h2. query.minimumMatch |
|
| 67 | 1 | ||
| 68 | 21 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 69 | 1 | *Default:* (empty) |
|
| 70 | 1 | *See:* http://wiki.apache.org/solr/DisMaxRequestHandler#mm_.28Minimum_.27Should.27_Match.29 |
|
| 71 | 5 | Stefan Sprenger | *Type:* String |
| 72 | 1 | ||
| 73 | 1 | Sets the minimum match _mm_ query parameter. |
|
| 74 | 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. |
|
| 75 | 1 | ||
| 76 | 1 | Please consult the link to the Solr wiki for a more detailed description of the mm syntax. |
|
| 77 | 1 | ||
| 78 | 1 | h2. query.boostFunction |
|
| 79 | 1 | ||
| 80 | 21 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 81 | 1 | *Default:* (empty) |
|
| 82 | 7 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/DisMaxRequestHandler#bf_.28Boost_Functions.29 |
| 83 | 7 | Stefan Sprenger | *Type:* String |
| 84 | 7 | Stefan Sprenger | |
| 85 | 7 | Stefan Sprenger | Sets the boost function _bf_ query parameter. |
| 86 | 7 | Stefan Sprenger | Allows to further manipulate the score of a document by using mathematical functions and field values of the current document. |
| 87 | 7 | Stefan Sprenger | A common use case for boost functions is to rank newer documents higher than older ones. |
| 88 | 7 | Stefan Sprenger | |
| 89 | 7 | Stefan Sprenger | Please consult the link to the Solr wiki for a more detailed description of boost functions. |
| 90 | 7 | Stefan Sprenger | |
| 91 | 7 | Stefan Sprenger | h1. results |
| 92 | 7 | Stefan Sprenger | |
| 93 | 51 | Stefan Sprenger | h2. results.siteHighlighting |
| 94 | 51 | Stefan Sprenger | |
| 95 | 51 | Stefan Sprenger | *Since:* version:2.0 |
| 96 | 51 | Stefan Sprenger | *Default:* 0 |
| 97 | 51 | Stefan Sprenger | *Type:* Boolean |
| 98 | 51 | Stefan Sprenger | |
| 99 | 52 | Ingo Renner | Activates TYPO3's highlighting of search words on the actual pages. The words a user searched for will be wrapped with a span and css class @csc-sword@ |
| 100 | 52 | Ingo Renner | Highlighting can be styled using the CSS class @csc-sword@, you need to add the style definition yourself for the complete site. |
| 101 | 51 | Stefan Sprenger | |
| 102 | 7 | Stefan Sprenger | h2. results.resultsPerPage |
| 103 | 7 | Stefan Sprenger | |
| 104 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 105 | 7 | Stefan Sprenger | *Default:* {$plugin.tx_solr.search.results.resultsPerPage} |
| 106 | 7 | Stefan Sprenger | *Type:* Integer |
| 107 | 7 | Stefan Sprenger | |
| 108 | 7 | Stefan Sprenger | Sets the number of shown results per page. |
| 109 | 7 | Stefan Sprenger | |
| 110 | 7 | Stefan Sprenger | h2. results.resultsPerPageSwitchOptions |
| 111 | 7 | Stefan Sprenger | |
| 112 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 113 | 7 | Stefan Sprenger | *Default:* 10, 20, 30, 50 |
| 114 | 7 | Stefan Sprenger | *Type:* String |
| 115 | 7 | Stefan Sprenger | |
| 116 | 7 | Stefan Sprenger | Defines the shown options of possible results per page. |
| 117 | 7 | Stefan Sprenger | |
| 118 | 7 | Stefan Sprenger | h2. results.fieldProcessingInstructions |
| 119 | 7 | Stefan Sprenger | |
| 120 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 121 | 18 | Markus Goldbach | *Options:* timestamp, utf8Decode, skip |
| 122 | 7 | Stefan Sprenger | *Type:* cObject |
| 123 | 7 | Stefan Sprenger | |
| 124 | 7 | Stefan Sprenger | Mapping of fieldname to processing instructions. Available instructions: timestamp, utf8Decode, skip (removes the field from the result). |
| 125 | 7 | Stefan Sprenger | |
| 126 | 7 | Stefan Sprenger | h2. results.fieldRenderingInstructions |
| 127 | 7 | Stefan Sprenger | |
| 128 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 129 | 7 | Stefan Sprenger | *Type:* cObject |
| 130 | 7 | Stefan Sprenger | |
| 131 | 7 | Stefan Sprenger | Additional rendering instructions for specified fields. |
| 132 | 7 | Stefan Sprenger | |
| 133 | 7 | Stefan Sprenger | h2. results.pagebrowser.templateFile |
| 134 | 7 | Stefan Sprenger | |
| 135 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 136 | 7 | Stefan Sprenger | *Default:* EXT:solr/resources/templates/pi_results/pagebrowser.htm |
| 137 | 7 | Stefan Sprenger | *Type:* String |
| 138 | 7 | Stefan Sprenger | |
| 139 | 7 | Stefan Sprenger | Defines the template used for the pagebrowser. |
| 140 | 7 | Stefan Sprenger | |
| 141 | 7 | Stefan Sprenger | h2. results.ignorePageBrowser |
| 142 | 7 | Stefan Sprenger | |
| 143 | 7 | Stefan Sprenger | *Since:* version:1.0 |
| 144 | 7 | Stefan Sprenger | *Default:* 0 |
| 145 | 21 | Ingo Renner | *Options:* 0, 1 |
| 146 | 7 | Stefan Sprenger | *Type:* Boolean |
| 147 | 7 | Stefan Sprenger | |
| 148 | 7 | Stefan Sprenger | If enabled, the selected page will be ignored an results by the first record. |
| 149 | 7 | Stefan Sprenger | |
| 150 | 7 | Stefan Sprenger | h2. results.showDocumentScoreAnalysis |
| 151 | 7 | Stefan Sprenger | |
| 152 | 7 | Stefan Sprenger | *Since:* version:2.0 |
| 153 | 1 | *Default:* 0 |
|
| 154 | 1 | *Options:* 0,1 |
|
| 155 | 1 | *Type:* Boolean |
|
| 156 | 1 | ||
| 157 | 1 | If enabled, the analysis and display of the score analysis for logged in backend users will be initialized. |
|
| 158 | 1 | ||
| 159 | 47 | Ingo Renner | h2. results.markResultTypeBoundaries |
| 160 | 47 | Ingo Renner | |
| 161 | 47 | Ingo Renner | *Since:* version:2.0, version:2.5-dkd |
| 162 | 47 | Ingo Renner | *Default:* 0 |
| 163 | 47 | Ingo Renner | *Options:* 0,1 |
| 164 | 47 | Ingo Renner | *Type:* Boolean |
| 165 | 47 | Ingo Renner | |
| 166 | 49 | Ingo Renner | This option allows for some kind of fake or client side (EXT:solr being the client) grouping of results. First you need to sort results by the type field. Then whenever the type field changes during rendering of the results, special fields are added to the documents at the result document type boundary. In your template you can then use an IF condition to insert markup at those boundaries based on those fields' values. The special document field names are "typeBegin" and "typeEnd". They have a value set to the new/old document type appended with "_begin"/"end". |
| 167 | 47 | Ingo Renner | |
| 168 | 47 | Ingo Renner | Example: |
| 169 | 47 | Ingo Renner | A result set with documents of types tt_news, pages, and tt_address: |
| 170 | 47 | Ingo Renner | <pre> |
| 171 | 47 | Ingo Renner | 1 pages -> typeBegin = pages_begin |
| 172 | 47 | Ingo Renner | 2 pages |
| 173 | 48 | Ingo Renner | 3 pages -> typeEnd = pages_end |
| 174 | 47 | Ingo Renner | 4 tt_address -> typeBegin = tt_address_begin |
| 175 | 47 | Ingo Renner | 5 tt_address |
| 176 | 48 | Ingo Renner | 6 tt_address -> typeEnd = tt_address_end |
| 177 | 47 | Ingo Renner | 7 tt_news -> typeBegin = tt_news_begin |
| 178 | 47 | Ingo Renner | 8 tt_news |
| 179 | 48 | Ingo Renner | 9 tt_news -> typeEnd = tt_news_end |
| 180 | 47 | Ingo Renner | </pre> |
| 181 | 47 | Ingo Renner | |
| 182 | 1 | h1. highlighting |
|
| 183 | 1 | ||
| 184 | 34 | Ingo Renner | h2. highlighting |
| 185 | 34 | Ingo Renner | |
| 186 | 34 | Ingo Renner | *Since:* version:1.0 |
| 187 | 34 | Ingo Renner | *Default:* 0 |
| 188 | 34 | Ingo Renner | *Type:* Boolean |
| 189 | 34 | Ingo Renner | |
| 190 | 34 | Ingo Renner | Set @plugin.tx_solr.highlighting = 1@ to enable search term highlighting. |
| 191 | 34 | Ingo Renner | |
| 192 | 9 | Stefan Sprenger | h2. highlighting.highlightFields |
| 193 | 9 | Stefan Sprenger | |
| 194 | 9 | Stefan Sprenger | *Since:* version:1.0 |
| 195 | 9 | Stefan Sprenger | *Default:* title,content |
| 196 | 9 | Stefan Sprenger | *Type:* String |
| 197 | 9 | Stefan Sprenger | |
| 198 | 9 | Stefan Sprenger | Should be a comma- or space-delimited list of fields to generate highlighted snippets for. |
| 199 | 10 | Stefan Sprenger | |
| 200 | 10 | Stefan Sprenger | h2. highlighting.fragmentSize |
| 201 | 10 | Stefan Sprenger | |
| 202 | 10 | Stefan Sprenger | *Since:* version:1.0 |
| 203 | 10 | Stefan Sprenger | *Default:* 200 |
| 204 | 10 | Stefan Sprenger | *Type:* Integer |
| 205 | 10 | Stefan Sprenger | |
| 206 | 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). |
| 207 | 10 | Stefan Sprenger | |
| 208 | 10 | Stefan Sprenger | h2. highlighting.wrap |
| 209 | 10 | Stefan Sprenger | |
| 210 | 1 | *Since:* version:1.0 |
|
| 211 | 1 | *Default:* <span class="results-highlight">|</span> |
|
| 212 | 1 | *Type:* String |
|
| 213 | 1 | ||
| 214 | 1 | This is used to format the highlighted parts. |
|
| 215 | 1 | ||
| 216 | 1 | h1. spellchecking |
|
| 217 | 1 | ||
| 218 | 34 | Ingo Renner | h2. spellchecking |
| 219 | 34 | Ingo Renner | |
| 220 | 34 | Ingo Renner | *Since:* version:1.0 |
| 221 | 34 | Ingo Renner | *Default:* 0 |
| 222 | 34 | Ingo Renner | *Type:* Boolean |
| 223 | 34 | Ingo Renner | |
| 224 | 34 | Ingo Renner | Set @plugin.tx_solr.spellchecking = 1@ to enable spellchecking / did you mean. |
| 225 | 34 | Ingo Renner | |
| 226 | 10 | Stefan Sprenger | h2. spellchecking.wrap |
| 227 | 10 | Stefan Sprenger | |
| 228 | 1 | *Since:* version:1.0 |
|
| 229 | 1 | *Default:* |<div class="spelling-suggestions">###LLL:didYouMean### |</div>| |
|
| 230 | 1 | *Type:* String |
|
| 231 | 1 | ||
| 232 | 1 | This is used to format spelling suggestions. |
|
| 233 | 1 | ||
| 234 | 1 | h1. lastSearches |
|
| 235 | 1 | ||
| 236 | 34 | Ingo Renner | h2. lastSearches |
| 237 | 34 | Ingo Renner | |
| 238 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 239 | 34 | Ingo Renner | *Default:* 0 |
| 240 | 34 | Ingo Renner | *Type:* Boolean |
| 241 | 34 | Ingo Renner | |
| 242 | 34 | Ingo Renner | Set @plugin.tx_solr.lastSearches = 1@ to display a list of the last searches. |
| 243 | 34 | Ingo Renner | |
| 244 | 1 | h2. lastSearches.limit |
|
| 245 | 10 | Stefan Sprenger | |
| 246 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 247 | 10 | Stefan Sprenger | *Default:* 10 |
| 248 | 10 | Stefan Sprenger | *Type:* Integer |
| 249 | 10 | Stefan Sprenger | |
| 250 | 10 | Stefan Sprenger | Defines the number of last searches, that should get minded. |
| 251 | 10 | Stefan Sprenger | |
| 252 | 10 | Stefan Sprenger | h2. lastSearches.mode |
| 253 | 1 | ||
| 254 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 255 | 1 | *Default:* user |
|
| 256 | 1 | *Options:* user, global |
|
| 257 | 1 | *Type:* String |
|
| 258 | 1 | ||
| 259 | 1 | If mode is user, keywords will get stored into the session. If mode is global keywords will get stored into the database. |
|
| 260 | 1 | ||
| 261 | 10 | Stefan Sprenger | h1. commonTerms |
| 262 | 1 | ||
| 263 | 34 | Ingo Renner | h2. commonTerms |
| 264 | 34 | Ingo Renner | |
| 265 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 266 | 34 | Ingo Renner | *Default:* 0 |
| 267 | 34 | Ingo Renner | *Type:* Boolean |
| 268 | 34 | Ingo Renner | |
| 269 | 34 | Ingo Renner | Set @plugin.tx_solr.commonTerms = 1@ to display a list of the frequent / common searches. |
| 270 | 34 | Ingo Renner | |
| 271 | 11 | Stefan Sprenger | h2. commonTerms.minSize |
| 272 | 11 | Stefan Sprenger | |
| 273 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 274 | 11 | Stefan Sprenger | *Default:* 14 |
| 275 | 11 | Stefan Sprenger | *Type:* Integer |
| 276 | 11 | Stefan Sprenger | |
| 277 | 1 | The difference between commonTerms.maxSize and commonTerms.minsize is getting used for calculating the current step. |
|
| 278 | 11 | Stefan Sprenger | |
| 279 | 11 | Stefan Sprenger | |
| 280 | 11 | Stefan Sprenger | h2. commonTerms.maxSize |
| 281 | 11 | Stefan Sprenger | |
| 282 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 283 | 1 | *Default:* 32 |
|
| 284 | 1 | *Type:* Integer |
|
| 285 | 11 | Stefan Sprenger | |
| 286 | 11 | Stefan Sprenger | The difference between commonTerms.maxSize and commonTerms.minsize is getting used for calculating the current step. |
| 287 | 11 | Stefan Sprenger | |
| 288 | 11 | Stefan Sprenger | h2. commonTerms.limit |
| 289 | 12 | Stefan Sprenger | |
| 290 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 291 | 1 | *Default:* 20 |
|
| 292 | 1 | *Type:* Integer |
|
| 293 | 1 | ||
| 294 | 1 | Defines the maximum size of the list by commonTerms.select. |
|
| 295 | 1 | ||
| 296 | 1 | h2. commonTerms.select |
|
| 297 | 1 | ||
| 298 | 34 | Ingo Renner | *Since:* version:1.3-dkd |
| 299 | 11 | Stefan Sprenger | *Type:* cObject |
| 300 | 11 | Stefan Sprenger | |
| 301 | 11 | Stefan Sprenger | Defines a database connection for retrieving statistics. |
| 302 | 11 | Stefan Sprenger | |
| 303 | 11 | Stefan Sprenger | h1. sorting |
| 304 | 11 | Stefan Sprenger | |
| 305 | 34 | Ingo Renner | h2. sorting |
| 306 | 34 | Ingo Renner | |
| 307 | 34 | Ingo Renner | *Since:* version:1.0 |
| 308 | 34 | Ingo Renner | *Default:* 0 |
| 309 | 34 | Ingo Renner | *Type:* Boolean |
| 310 | 34 | Ingo Renner | |
| 311 | 34 | Ingo Renner | Set @plugin.tx_solr.sorting = 1@ to allow sorting of results. |
| 312 | 34 | Ingo Renner | |
| 313 | 11 | Stefan Sprenger | h2. sorting.defaultOrder |
| 314 | 11 | Stefan Sprenger | |
| 315 | 12 | Stefan Sprenger | *Since:* version:1.0 |
| 316 | 11 | Stefan Sprenger | *Default:* ASC |
| 317 | 11 | Stefan Sprenger | *Options:* ASC, DESC |
| 318 | 11 | Stefan Sprenger | *Type:* String |
| 319 | 11 | Stefan Sprenger | |
| 320 | 11 | Stefan Sprenger | Sets the order of sortings. |
| 321 | 11 | Stefan Sprenger | |
| 322 | 11 | Stefan Sprenger | h2. sorting.fields |
| 323 | 12 | Stefan Sprenger | |
| 324 | 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. |
| 325 | 11 | Stefan Sprenger | |
| 326 | 34 | Ingo Renner | h3. sorting.fields.[sortField].label |
| 327 | 11 | Stefan Sprenger | |
| 328 | 11 | Stefan Sprenger | *Since:* version:1.0 |
| 329 | 11 | Stefan Sprenger | *Type:* String |
| 330 | 11 | Stefan Sprenger | |
| 331 | 34 | Ingo Renner | Defines the name of the field's label. |
| 332 | 13 | Stefan Sprenger | |
| 333 | 13 | Stefan Sprenger | h1. faceting |
| 334 | 13 | Stefan Sprenger | |
| 335 | 37 | Ingo Renner | h2. faceting |
| 336 | 37 | Ingo Renner | |
| 337 | 37 | Ingo Renner | *Since:* version:1.0 |
| 338 | 37 | Ingo Renner | *Default:* 0 |
| 339 | 37 | Ingo Renner | *Type:* Boolean |
| 340 | 37 | Ingo Renner | |
| 341 | 37 | Ingo Renner | Set @plugin.tx_solr.faceting = 1@ to enable faceting. |
| 342 | 37 | Ingo Renner | |
| 343 | 13 | Stefan Sprenger | h2. faceting.minimumCount |
| 344 | 13 | Stefan Sprenger | |
| 345 | 13 | Stefan Sprenger | *Since:* version:1.0 |
| 346 | 13 | Stefan Sprenger | *Default:* 1 |
| 347 | 13 | Stefan Sprenger | *Type:* Integer |
| 348 | 13 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/SimpleFacetParameters#facet.mincount |
| 349 | 13 | Stefan Sprenger | |
| 350 | 13 | Stefan Sprenger | This indicates the minimum counts for facet fields should be included in the response. |
| 351 | 13 | Stefan Sprenger | |
| 352 | 13 | Stefan Sprenger | h2. faceting.sortBy |
| 353 | 13 | Stefan Sprenger | |
| 354 | 13 | Stefan Sprenger | *Since:* version:1.0 |
| 355 | 13 | Stefan Sprenger | *Default:* count |
| 356 | 20 | Ingo Renner | *Options:* count, index, 1, 0, true, false, alpha (version:1.2, version:2.0), lex (version:1.2, version:2.0) |
| 357 | 13 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/SimpleFacetParameters#facet.sort |
| 358 | 13 | Stefan Sprenger | *Type:* String |
| 359 | 1 | ||
| 360 | 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. |
| 361 | 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. |
| 362 | 13 | Stefan Sprenger | |
| 363 | 13 | Stefan Sprenger | h2. faceting.limit |
| 364 | 13 | Stefan Sprenger | |
| 365 | 13 | Stefan Sprenger | *Since:* version:1.0 |
| 366 | 13 | Stefan Sprenger | *Default:* 10 |
| 367 | 13 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/SimpleFacetParameters#facet.limit |
| 368 | 13 | Stefan Sprenger | *Type:* Integer |
| 369 | 13 | Stefan Sprenger | |
| 370 | 13 | Stefan Sprenger | This indicates the maximum number of constraint counts that should be returned for the facet fields. A negative value means unlimited. |
| 371 | 13 | Stefan Sprenger | |
| 372 | 13 | Stefan Sprenger | h2. faceting.singleFacetMode |
| 373 | 13 | Stefan Sprenger | |
| 374 | 27 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 375 | 13 | Stefan Sprenger | *Default:* 0 |
| 376 | 21 | Ingo Renner | *Options:* 0, 1 |
| 377 | 13 | Stefan Sprenger | *Type:* Boolean |
| 378 | 1 | ||
| 379 | 27 | Ingo Renner | If enabled, the user can only use one facet at a time. |
| 380 | 27 | Ingo Renner | |
| 381 | 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. |
| 382 | 13 | Stefan Sprenger | |
| 383 | 31 | Ingo Renner | h2. faceting.removeFacetLinkText |
| 384 | 31 | Ingo Renner | |
| 385 | 31 | Ingo Renner | *Since:* version:1.0 |
| 386 | 31 | Ingo Renner | *Default:* @facetText (remove) |
| 387 | 31 | Ingo Renner | *Type:* String |
| 388 | 31 | Ingo Renner | |
| 389 | 31 | Ingo Renner | Defines the text for a link used for removing a given facet from the search results. |
| 390 | 31 | Ingo Renner | |
| 391 | 31 | Ingo Renner | h2. faceting.showAllLink.wrap |
| 392 | 31 | Ingo Renner | |
| 393 | 31 | Ingo Renner | *Since:* version:1.0 |
| 394 | 31 | Ingo Renner | *Default:* <li>|</li> |
| 395 | 31 | Ingo Renner | *Type:* String |
| 396 | 31 | Ingo Renner | |
| 397 | 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. |
| 398 | 31 | Ingo Renner | |
| 399 | 31 | Ingo Renner | h2. faceting.showEmptyFacets |
| 400 | 31 | Ingo Renner | |
| 401 | 31 | Ingo Renner | *Since:* version:1.3 |
| 402 | 31 | Ingo Renner | *Default:* 1 |
| 403 | 31 | Ingo Renner | *Options:* 0, 1 |
| 404 | 31 | Ingo Renner | *Type:* Boolean |
| 405 | 31 | Ingo Renner | |
| 406 | 40 | Ingo Renner | By setting this option to 0, you can prevent rendering of empty facets. Usually, although a facet does not offer any options to filter a set of result documents, the facet header might still be shown depending on the template. Using this option prevents the header from appearing when no filter options are provided. |
| 407 | 31 | Ingo Renner | |
| 408 | 50 | Dean Ranft | h2. faceting.facetLinkATagParams |
| 409 | 50 | Dean Ranft | |
| 410 | 50 | Dean Ranft | *Since:* version:2.0 |
| 411 | 50 | Dean Ranft | *Type:* String |
| 412 | 50 | Dean Ranft | |
| 413 | 50 | Dean Ranft | With this option you have the possibility to add A-Tag attributes for links of all facet-options. |
| 414 | 50 | Dean Ranft | |
| 415 | 50 | Dean Ranft | <pre><code class="typoscript"> |
| 416 | 50 | Dean Ranft | plugin.tx_solr.search.faceting.facetLinkATagParams = class="green" |
| 417 | 50 | Dean Ranft | </code></pre> |
| 418 | 50 | Dean Ranft | |
| 419 | 13 | Stefan Sprenger | h2. faceting.facets |
| 420 | 13 | Stefan Sprenger | |
| 421 | 13 | Stefan Sprenger | *Since:* version:1.0 |
| 422 | 13 | Stefan Sprenger | *Default:* type, author |
| 423 | 13 | Stefan Sprenger | *See:* http://wiki.apache.org/solr/SolrFacetingOverview |
| 424 | 13 | Stefan Sprenger | *Type:* cObject |
| 425 | 13 | Stefan Sprenger | |
| 426 | 14 | Ingo Renner | Defines on which fields you want to facet. It's a list of facet configurations. |
| 427 | 14 | Ingo Renner | |
| 428 | 14 | Ingo Renner | <pre><code class="typoscript"> |
| 429 | 14 | Ingo Renner | plugin.tx_solr.search.faceting.facets { |
| 430 | 14 | Ingo Renner | // type is the name of the facet configuration, you can choose whatever name |
| 431 | 14 | Ingo Renner | type { |
| 432 | 14 | Ingo Renner | field = type // the index field you want to create a facet from |
| 433 | 14 | Ingo Renner | label = Content Type // a label |
| 434 | 14 | Ingo Renner | sortBy = index // sorte the facet options alphabetically, otherwise they are sorted by count, options with more results on top |
| 435 | 14 | Ingo Renner | |
| 436 | 14 | Ingo Renner | keepAllOptionsOnSelection = 1 // if set allows to choose more than one option from this facet |
| 437 | 14 | Ingo Renner | operator = OR // used in combination with keepAllOptionsOnSelection to set how multiple options from one facet are combined, can also be AND |
| 438 | 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. |
| 439 | 14 | Ingo Renner | } |
| 440 | 15 | Ingo Renner | |
| 441 | 15 | Ingo Renner | myOtherFacet { |
| 442 | 1 | ... |
|
| 443 | 1 | } |
|
| 444 | 1 | } |
|
| 445 | 1 | </code></pre> |
|
| 446 | 21 | Ingo Renner | |
| 447 | 35 | Ingo Renner | h2. faceting.facets.[facetName] - single facet configuration |
| 448 | 1 | ||
| 449 | 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". |
| 450 | 24 | Ingo Renner | |
| 451 | 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. |
| 452 | 24 | Ingo Renner | |
| 453 | 35 | Ingo Renner | h3. faceting.facets.[facetName].field |
| 454 | 24 | Ingo Renner | |
| 455 | 24 | Ingo Renner | *Since:* version:1.0 |
| 456 | 24 | Ingo Renner | *Type:* String |
| 457 | 24 | Ingo Renner | *Required* |
| 458 | 24 | Ingo Renner | |
| 459 | 24 | Ingo Renner | Which field to use to create the facet. |
| 460 | 24 | Ingo Renner | |
| 461 | 35 | Ingo Renner | h3. faceting.facets.[facetName].label |
| 462 | 24 | Ingo Renner | |
| 463 | 24 | Ingo Renner | *Since:* version:1.0 |
| 464 | 24 | Ingo Renner | *Type:* String |
| 465 | 24 | Ingo Renner | *Required* |
| 466 | 24 | Ingo Renner | |
| 467 | 24 | Ingo Renner | Used as a headline or title to describe the options of a facet. |
| 468 | 24 | Ingo Renner | |
| 469 | 35 | Ingo Renner | h3. faceting.facets.[facetName].selectingSelectedFacetOptionRemovesFilter |
| 470 | 23 | Ingo Renner | |
| 471 | 21 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 472 | 21 | Ingo Renner | *Default:* 0 |
| 473 | 21 | Ingo Renner | *Options:* 0, 1 |
| 474 | 21 | Ingo Renner | *Type:* Boolean |
| 475 | 21 | Ingo Renner | |
| 476 | 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. |
| 477 | 22 | Ingo Renner | |
| 478 | 1 | Feel free to suggest a better name for this option... |
|
| 479 | 22 | Ingo Renner | |
| 480 | 35 | Ingo Renner | h3. faceting.facets.[facetName].keepAllOptionsOnSelection |
| 481 | 22 | Ingo Renner | |
| 482 | 22 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 483 | 22 | Ingo Renner | *Default:* 0 |
| 484 | 22 | Ingo Renner | *Options:* 0, 1 |
| 485 | 22 | Ingo Renner | *Type:* Boolean |
| 486 | 22 | Ingo Renner | |
| 487 | 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. |
| 488 | 22 | Ingo Renner | |
| 489 | 22 | Ingo Renner | This is useful if you want to allow the user to select more than one option from a single facet. |
| 490 | 22 | Ingo Renner | |
| 491 | 35 | Ingo Renner | h3. faceting.facets.[facetName].singleOptionMode |
| 492 | 32 | Ingo Renner | |
| 493 | 32 | Ingo Renner | *Since:* version:1.3, version:2.0 |
| 494 | 32 | Ingo Renner | *Default:* 0 |
| 495 | 32 | Ingo Renner | *Options:* 0, 1 |
| 496 | 32 | Ingo Renner | *Type:* Boolean |
| 497 | 32 | Ingo Renner | |
| 498 | 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. |
| 499 | 32 | Ingo Renner | |
| 500 | 33 | Ingo Renner | This option can not be used together with selectingSelectedFacetOptionRemovesFilter as it overrides its behavior. |
| 501 | 33 | Ingo Renner | |
| 502 | 32 | Ingo Renner | |
| 503 | 35 | Ingo Renner | h3. faceting.facets.[facetName].operator |
| 504 | 25 | Ingo Renner | |
| 505 | 25 | Ingo Renner | *Since:* version:1.2, version:2.0 |
| 506 | 25 | Ingo Renner | *Default:* AND |
| 507 | 25 | Ingo Renner | *Options:* OR, AND |
| 508 | 25 | Ingo Renner | *Type:* String |
| 509 | 25 | Ingo Renner | |
| 510 | 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. |
| 511 | 25 | Ingo Renner | |
| 512 | 43 | Ingo Renner | h3. faceting.facets.[facetName].sortBy |
| 513 | 43 | Ingo Renner | |
| 514 | 43 | Ingo Renner | *Since:* version:1.2 |
| 515 | 43 | Ingo Renner | *Default:* - |
| 516 | 43 | Ingo Renner | *Options:* alpha (aliases: index, lex) |
| 517 | 43 | Ingo Renner | *Type:* String |
| 518 | 43 | Ingo Renner | |
| 519 | 43 | Ingo Renner | Sets how a single facet's options are sorted, by default they are sorted by number of results, highest on top. |
| 520 | 43 | Ingo Renner | Facet options can also be sorted alphabetically by setting the option to alpha. |
| 521 | 43 | Ingo Renner | |
| 522 | 36 | Ingo Renner | h3. faceting.facets.[facetName].includeInAvailableFacets |
| 523 | 29 | Stefan Sprenger | |
| 524 | 29 | Stefan Sprenger | *Since:* version:1.3 |
| 525 | 29 | Stefan Sprenger | *Default:* 1 |
| 526 | 29 | Stefan Sprenger | *Options:* 0, 1 |
| 527 | 29 | Stefan Sprenger | *Type:* Boolean |
| 528 | 29 | Stefan Sprenger | |
| 529 | 29 | Stefan Sprenger | By setting this option to 0, you can prevent rendering of a given facet within the available facets list. |
| 530 | 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. |
| 531 | 29 | Stefan Sprenger | |
| 532 | 44 | Ingo Renner | h3. faceting.facets.[facetName].renderer |
| 533 | 44 | Ingo Renner | |
| 534 | 44 | Ingo Renner | *Since:* version:1.6-dkd |
| 535 | 46 | Ingo Renner | *Type:* Class name |
| 536 | 44 | Ingo Renner | |
| 537 | 45 | Ingo Renner | Defines an alternative renderer class for a facet. The class must implement interface tx_solr_FacetRenderer |
| 538 | 45 | Ingo Renner | |
| 539 | 45 | Ingo Renner | Available facet types / renderers: |
| 540 | 45 | Ingo Renner | * tx_solr_facet_HierarchicalFacetRenderer - render hierarchical facets, indexed using the "pathToHierarchy" [[Tx_solrindex#fieldProcessingInstructions|field processing instruction]] |
| 541 | 45 | Ingo Renner | * tx_solr_facet_DateRangeFacetRenderer - renders two date input fields with date picker |
| 542 | 1 | ||
| 543 | 46 | Ingo Renner | h3. faceting.facets.[facetName].filterParser |
| 544 | 1 | ||
| 545 | 46 | Ingo Renner | *Since:* version:1.7-dkd |
| 546 | 46 | Ingo Renner | *Type:* Class name |
| 547 | 46 | Ingo Renner | |
| 548 | 46 | Ingo Renner | A class name that is used to create a filter parser to turn filter GET parameter generated by a facet renderer (see above) into a Lucene filter. This is useful to have a more readable filter GET parameter in the URL, but sill being able to use Lucene filters internally. |
| 549 | 46 | Ingo Renner | |
| 550 | 46 | Ingo Renner | Available filter parser: |
| 551 | 46 | Ingo Renner | * tx_solr_query_filterparser_DateRange - resolve a date range filter created by tx_solr_facet_DateRangeFacetRenderer |
| 552 | 46 | Ingo Renner | |
| 553 | 46 | Ingo Renner | <pre> |
| 554 | 46 | Ingo Renner | Example: |
| 555 | 46 | Ingo Renner | |
| 556 | 46 | Ingo Renner | URL GET parameter for a date range as generated by tx_solr_facet_DateRangeFacetRenderer: |
| 557 | 46 | Ingo Renner | dateCreated:200910010000-201107012359 (format is YYYYMMDDHHMM) |
| 558 | 46 | Ingo Renner | |
| 559 | 46 | Ingo Renner | Transformed into a Lucene filter by tx_solr_query_filterparser_DateRange: |
| 560 | 46 | Ingo Renner | created:[2009-10-01T00:00:00Z TO 2011-07-01T23:59:59Z] |
| 561 | 46 | Ingo Renner | </pre> |
| 562 | 44 | Ingo Renner | |
| 563 | 35 | Ingo Renner | h3. faceting.facets.[facetName].renderingInstruction |
| 564 | 28 | Ingo Renner | |
| 565 | 28 | Ingo Renner | *Since:* version:1.0 |
| 566 | 28 | Ingo Renner | *Type:* cObject |
| 567 | 28 | Ingo Renner | |
| 568 | 28 | Ingo Renner | Overwrites how single facet options are rendered using TypoScript cObjects. |
| 569 | 28 | Ingo Renner | |
| 570 | 28 | Ingo Renner | Example: (taken from issue #5920) |
| 571 | 28 | Ingo Renner | <pre><code class="typoscript"> |
| 572 | 28 | Ingo Renner | plugin.tx_solr { |
| 573 | 28 | Ingo Renner | search { |
| 574 | 28 | Ingo Renner | faceting { |
| 575 | 28 | Ingo Renner | facets { |
| 576 | 28 | Ingo Renner | type { |
| 577 | 28 | Ingo Renner | renderingInstruction = CASE |
| 578 | 28 | Ingo Renner | renderingInstruction { |
| 579 | 28 | Ingo Renner | key.field = optionValue |
| 580 | 28 | Ingo Renner | |
| 581 | 28 | Ingo Renner | pages = TEXT |
| 582 | 28 | Ingo Renner | pages.value = Pages |
| 583 | 28 | Ingo Renner | pages.lang.de = Seiten |
| 584 | 28 | Ingo Renner | |
| 585 | 28 | Ingo Renner | file = TEXT |
| 586 | 28 | Ingo Renner | file.value = Files |
| 587 | 28 | Ingo Renner | file.lang.de = Dateien |
| 588 | 28 | Ingo Renner | |
| 589 | 28 | Ingo Renner | tt_news = TEXT |
| 590 | 13 | Stefan Sprenger | tt_news.value = News |
| 591 | 13 | Stefan Sprenger | tt_news.lang.de = Nachrichten |
| 592 | 13 | Stefan Sprenger | } |
| 593 | 13 | Stefan Sprenger | } |
| 594 | 13 | Stefan Sprenger | |
| 595 | 13 | Stefan Sprenger | language { |
| 596 | 13 | Stefan Sprenger | renderingInstruction = CASE |
| 597 | 13 | Stefan Sprenger | renderingInstruction { |
| 598 | 13 | Stefan Sprenger | key.field = optionValue |
| 599 | 13 | Stefan Sprenger | |
| 600 | 13 | Stefan Sprenger | 0 = TEXT |
| 601 | 13 | Stefan Sprenger | 0.value = English |
| 602 | 13 | Stefan Sprenger | 0.lang.de = Englisch |
| 603 | 13 | Stefan Sprenger | |
| 604 | 13 | Stefan Sprenger | 1 = TEXT |
| 605 | 30 | Stefan Sprenger | 1.value = German |
| 606 | 30 | Stefan Sprenger | 1.lang.de = Deutsch |
| 607 | 30 | Stefan Sprenger | } |
| 608 | 30 | Stefan Sprenger | } |
| 609 | 30 | Stefan Sprenger | } |
| 610 | 30 | Stefan Sprenger | } |
| 611 | 30 | Stefan Sprenger | } |
| 612 | 30 | Stefan Sprenger | } |
| 613 | 30 | Stefan Sprenger | </code></pre> |
| 614 | 50 | Dean Ranft | |
| 615 | 50 | Dean Ranft | h3. faceting.facets.[facetName].facetLinkATagParams |
| 616 | 50 | Dean Ranft | |
| 617 | 50 | Dean Ranft | *Since:* version:2.0 |
| 618 | 50 | Dean Ranft | *Type:* String |
| 619 | 50 | Dean Ranft | |
| 620 | 50 | Dean Ranft | With this option you have the possibility to add A-Tag attributes for all option-links of a single facet. |
| 621 | 50 | Dean Ranft | This option overwrites the global setting "faceting.facetLinkATagParams". |
| 622 | 50 | Dean Ranft | Check up "faceting.facetLinkATagParams" for more information. |