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

Stefan Sprenger stefan.sprenger at dkd.de
Tue Feb 19 12:04:52 CET 2013


-----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-----


More information about the TYPO3-project-solr mailing list