Solr.ts 8.72 KB
Newer Older
1
2
3
4
5
plugin {
    tx_solr {
        solr {
            host = solr
            port = 8983
6
            path = solr/t3o/
7
        }
8

9
10
11
        #templateFiles {
        #    search = EXT:ter_layout/Resources/Private/Ext/Solr/Search.html
        #}
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

        index {
            queue {
                ter_extension = 1
                ter_extension.table = tx_terfe2_domain_model_extension
                ter_extension.additionalWhereClause = last_version > 0
                ter_extension.indexer = Tx_TerFe2_Solr_Indexqueue_TerIndexer
                ter_extension.fields {

                    setRegister_ignored = LOAD_REGISTER
                    setRegister_ignored {
                        extensionVersion.cObject = SOLR_RELATION
                        extensionVersion.cObject {
                            localField = last_version
                            foreignLabelField = version_string
                        }

                        extensionKey.cObject = TEXT
                        extensionKey.cObject.field = ext_key

                        extensionState.cObject = SOLR_RELATION
                        extensionState.cObject {
                            localField = last_version
                            foreignLabelField = state
                        }
                    }

                    author = SOLR_CONTENT
                    author {
                        cObject = SOLR_RELATION
                        cObject {
                            localField = last_version
                            foreignLabelField = author
                        }
                    }

                    author_textWstS = SOLR_CONTENT
                    author_textWstS {
                        cObject = SOLR_RELATION
                        cObject {
                            localField = last_version
                            foreignLabelField = author
                        }
                    }

                    title = SOLR_CONTENT
                    title {
                        cObject = SOLR_RELATION
                        cObject {
                            localField = last_version
                            foreignLabelField = title
                        }
                    }

                    sortTitle_stringS = SOLR_CONTENT
                    sortTitle_stringS  {
                        cObject = SOLR_RELATION
                        cObject {
                            localField = last_version
                            foreignLabelField = title
                        }
                    }

                    content = SOLR_CONTENT
                    content  {
                        cObject = SOLR_RELATION
                        cObject {
                            localField = last_version
                            foreignLabelField = description
                        }
                    }

                    url = TEXT
                    url {
                        typolink.parameter = {$plugin.tx_solr.ter_detailpage}
                        typolink.additionalParams = &tx_terfe2_pi1[controller]=Extension&tx_terfe2_pi1[action]=show&tx_terfe2_pi1[extension]={field:uid}
                        typolink.additionalParams.insertData = 1
                        typolink.useCacheHash = 1
                        typolink.returnLast = url
                    }

                    extensionKey_textS = ext_key
                    extensionKey_stringS = ext_key

                    extensionVersion_stringS = TEXT
                    extensionVersion_stringS {
                        value = {register:extensionVersion}
                        insertData = 1
                    }

                    extensionState_stringS = TEXT
                    extensionState_stringS {
                        value = n/a
                        override {
                            data = register:extensionState
                            if {
                                isInList.data = register:extensionState
                                value = alpha,beta,stable,test,experimental,obsolete
                            }
                        }
                    }

                    extensionLastUpload_dateS = TEXT
                    extensionLastUpload_dateS {
                        cObject = SOLR_RELATION
                        cObject {
                            localField = last_version
                            foreignLabelField = upload_date
                        }

                        date = Y-m-d\TH:i:s\Z
                    }

                    extensionLastUpload_intS = SOLR_RELATION
                    extensionLastUpload_intS {
                        localField = last_version
                        foreignLabelField = upload_date
                    }

                    extensionLastUpload_tDateS = TEXT
                    extensionLastUpload_tDateS {
                        cObject = SOLR_RELATION
                        cObject {
                            localField = last_version
                            foreignLabelField = upload_date
                        }

                        date = Y-m-d\TH:i:s\Z
                    }

                    extensionDownloads_intS = downloads

                    extensionHasZipFile_intS = SOLR_RELATION
                    extensionHasZipFile_intS {
                        localField = last_version
                        foreignLabelField = has_zip_file
                    }

                    extensionManual_intS = SOLR_RELATION
                    extensionManual_intS {
                        localField = last_version
                        foreignLabelField = has_manual
                    }

                    extensionDownloadT3xUrl_stringS = TEXT
                    extensionDownloadT3xUrl_stringS {
                        typolink.parameter = {$plugin.tx_solr.ter_detailpage}
                        typolink.additionalParams = &tx_terfe2_pi1[controller]=Extension&tx_terfe2_pi1[action]=download&tx_terfe2_pi1[extension]={field:uid}&tx_terfe2_pi1[versionString]={register:extensionVersion}&tx_terfe2_pi1[format]=t3x
                        typolink.additionalParams.insertData = 1
                        typolink.useCacheHash = 1
                        typolink.returnLast = url
                    }

                    extensionDownloadZipUrl_stringS = TEXT
                    extensionDownloadZipUrl_stringS {
                        typolink.parameter = {$plugin.tx_solr.ter_detailpage}
                        typolink.additionalParams = &tx_terfe2_pi1[controller]=Extension&tx_terfe2_pi1[action]=download&tx_terfe2_pi1[extension]={field:uid}&tx_terfe2_pi1[versionString]={register:extensionVersion}&tx_terfe2_pi1[format]=zip
                        typolink.additionalParams.insertData = 1
                        typolink.useCacheHash = 1
                        typolink.returnLast = url
                    }

                    extensionDocumentationLink_stringS = USER
                    extensionDocumentationLink_stringS {
                        includeLibs = EXT:t3org_base/userfunc/ter_generate_extension_doc_link.php
                        userFunc = user_generateExtensionDocumentationLink

                        # ToDo remove this parameter
                        urlPrefix = TEXT
                        urlPrefix.value =

                        extensionKey = TEXT
                        extensionKey.data = register:extensionKey

                        extensionVersion = TEXT
                        extensionVersion.data = register:extensionVersion
                    }

                    extensionReviewState_intS = SOLR_RELATION
                    extensionReviewState_intS {
                        localField = last_version
                        foreignLabelField = review_state
                    }

                    extensionCategory_stringS = SOLR_CONTENT
                    extensionCategory_stringS  {
                        cObject = SOLR_RELATION
                        cObject {
                            localField = last_version
                            foreignLabelField = em_category
                        }
                    }

Thomas Löffler's avatar
Thomas Löffler committed
205
206
207
                    siteName_stringS = TEXT
                    siteName_stringS.value = t3o

208
209
210
211
212
                    keywords = SOLR_RELATION
                    keywords {
                        localField = tags
                        multiValue = 1
                    }
213
214
215
                }
            }
        }
216
217
218
        search{
            query{
                // qf parameter http://wiki.apache.org/solr/DisMaxQParserPlugin#qf_.28Query_Fields.29
Thomas Löffler's avatar
Thomas Löffler committed
219
                queryFields = content^40.0, extensionKey_textS^20.0, title^5.0, keywords^2.0, tagsH1^5.0, tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0, author^1.0
220
221
222
                }
            }
        }
223
224
    }
}