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

Schwarzenberg schwarzenberg at uni-leipzig.de
Tue Feb 19 12:42:50 CET 2013


ah, i didn't know it's pure sql there. that makes it indeed very easy.
so, this works:

additionalWhereClause = file_path like 'fileadmin/DOMAIN1/%' and file_type in ('pdf','doc', 'docx')

thank you again,
heiko

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Heiko,
>
>> 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?
>
> this is pure SQL, you might try your commands directly in the database.
>
>> 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?
>
> You might try the LIKE operator:
> http://dev.mysql.com/doc/refman/5.0/en/pattern-matching.html
>
> E.g: additionalWhereClause = file_path LIKE '%DOMAIN1%'
>
>
> HTH,
>
> Stefan
> - --
> 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äftsführer: 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/
>
> iEYEARECAAYFAlEjXFQACgkQmni/AWn6C/aqNgCfUhuNmrlYuaOVqvQrxhwDot7P
> yJAAmgJx/gRfokHIOPLQ8IA4Uy2+mQT/
> =Vqj2
> -----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