[TYPO3-Solr] limit dam indexing to specific file-types

Schwarzenberg schwarzenberg at uni-leipzig.de
Tue Feb 19 11:57:52 CET 2013


Stefan,

that looks good, thank you!

but neither
plugin.tx_solr.index.queue.dam.additionalWhereClause = file_type IN (pdf,docx)
nor
plugin.tx_solr.index.queue.dam.additionalWhereClause = file_type IN ('pdf','docx')
did not work. with that, no tx_dam-Entry was indexed at all.

in the end,
plugin.tx_solr.index.queue.dam.additionalWhereClause = media_type = 1
(which is pdf) did work. did i use the wrong syntax when trying to filter by file_type?

beside that, another problem popped up: because i have a multidomain setup, the documents are 
uploaded in 'fileadmin/DOMAIN1/' and 'fileadmin/DOMAIN2/'

so if i am in DOMAIN1, i only want to index documents that are RECURSIVELY located unter
fileadmin/DOMAIN1/

so, something like
additionalWhereClause = file_path = 'fileadmin/DOMAIN1/'
is not sufficient because i need something like file_path.startswith= 'fileadmin/DOMAIN1/' to match 
the items in subfolders too.
can this be be achieved somehow?

regards, heiko





Am 19.02.2013 09:58, schrieb Stefan Sprenger:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Heiko,
>
> you can limit the indexed elements by specifying an additional where
> clause:
>
> http://forge.typo3.org/projects/extension-solr/wiki/Tx_solrindex#queueindexingConfigurationadditionalWhereClause
>
>
> HTH,
>
> Stefan
>
> Am 19.02.13 09:09, schrieb Schwarzenberg:
>> hi list,
>>
>> i have some questions regarding indexing ext:dam records.
>> i use ext:solr v2.2.2 and already managed it to get dam contents
>> indexed. this is the corresponding typoscript configuration:
>>
>> plugin.tx_solr.index.queue {
>>         dam = 1
>>         dam {
>>
>>                  additionalPageIds = {$MEDIA_UID}
>>                  table = tx_dam
>>
>>                  fields {
>>
>>                          title = title
>>                          content = description
>>
>>                          filetype_stringS = file_type
>>                          filename_stringS = file_name
>>                          filepath_stringS = file_path
>>
>>                          sortTitle_stringS = title
>>
>>                          keywords = SOLR_MULTIVALUE
>>                          keywords.field = keywords
>>
>>                          keywords_stringM = SOLR_MULTIVALUE
>>                          keywords_stringM.field = keywords
>>
>>                          url = TEXT
>>                          url {
>>                                  typolink.parameter.dataWrap =
>> {field:file_path}{field:file_name}
>>                                  typolink.useCacheHash = 1
>>                                  typolink.returnLast = url
>>                          }
>>
>>                  }
>>
>>          }
>> }
>>
>> the unwanted side-effect (for me :-) ) now is, that images also get
>> indexed. so, if i search for "wlan" for example, i also get an image
>> called "wlan.jpg" in my search results,  which i do not want. is it
>> possible to limit the indexing to specific files, for example only to
>> pdf-Documents?
>>
>> regards, heiko
> - --
> dkd Internet Service GmbH
> development // kommunikation // design
>
> Anschrift:
> * Kaiserstra￟e 73
> * 60329 Frankfurt/Main
>
> Kontakt:
> mail: stefan.sprenger at dkd.de
> * fon: +49 69 2475218-36
> * fax: +49 69 2475218-99
>
> Im Netz:
> * web: http://www.dkd.de
> * twitter: http://twitter.dkd.de
> * facebook: http://facebook.dkd.de
> * google+: http://googleplus.dkd.de
> * linked in: http://linkedin.dkd.de
> * xing: http://xing.dkd.de
> * flickr: http://flickr.dkd.de
>
> Aktuelle Projekte:
> - - http://www.akad.de - Relaunch Website (TYPO3)
> - - http://www.sartorius.com ? Relaunch Website (TYPO3)
> - - http://www.coface-aktuell.de ? Launch Website (TYPO3)
>
> Gesch¦ftsfhrer: O. Dobberkau, S. Schaffstein, G. Wegenast, C. Zabanski
> Registergericht: Amtsgericht Frankfurt am Main
> Registernummer: HRB 45590
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.11 (Darwin)
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iEYEARECAAYFAlEjPtAACgkQmni/AWn6C/alTACfTvquQ/mt1Mh3Z9LhDuTrqwR2
> eXAAnROHk3VWgPE+IjsYDuklNep2oJM5
> =Pqp9
> -----END PGP SIGNATURE-----
> _______________________________________________
> TYPO3-project-solr mailing list
> TYPO3-project-solr at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
>


More information about the TYPO3-project-solr mailing list