[TYPO3-Solr] Exclude page from result for blacklist keywords

Philipp Bräutigam | Agenturwerft pbraeutigam at agenturwerft.de
Mon Jan 13 11:08:27 CET 2014


Hi Lienhart, Hi Hans,

you are right, the filters have the stdWrap functionality so it would be possible to get the solution for this problem with your example.
I have tested in my environment but it didn't worked as i wanted.

plugin.tx_solr.search.query {
    filter {
        badKeywords = - badkeywords_textM:foo
    }
}

This works as expected but when i would like to wrap the filter it dont exclude the defined pages.

plugin.tx_solr.search.query.filter.badKeywords {
    wrap = -badkeywords_textM:|
    data = GP: tx_solr|q
}

Normally it would be possible to do this, because the filter in the initializeAdditionalFilters() function are wraped with the stdWrap method.

Greets,
Philipp

-----Ursprüngliche Nachricht-----
Von: typo3-project-solr-bounces at lists.typo3.org [mailto:typo3-project-solr-bounces at lists.typo3.org] Im Auftrag von Hans Höchtl
Gesendet: Montag, 13. Januar 2014 10:57
An: Apache Solr search for TYPO3 project
Betreff: Re: [TYPO3-Solr] Exclude page from result for blacklist keywords

Hi Lienhart,

I missed the line of code saying cObj->stdWrap. Thank you very much for this important informaiton.

I will check if this works an add to the Wiki documentation.

Thanks,
Hans


2014/1/13 Lienhart Woitok <Lienhart.Woitok at netlogix.de>

> Hi Philipp, Hans,
>
> this is not a missing feature. You are already able to stdWrap 
> filters. So something like the following (untested) should work:
>
> plugin.tx_solr.search.query.filter.badKeywords {
>         wrap = -badkeywords_textM:|
>         data = GP : tx_solr|q
> }
>
> Regards
>
> Lienhart Woitok
> Web-Entwickler
>
> Telefon: +49 (911) 539909 - 0
> E-Mail: Lienhart.Woitok at netlogix.de
> Website: media.netlogix.de
>
>
>
> --
> netlogix GmbH & Co. KG
> IT-Services | IT-Training | Media
> Neuwieder Straße 10 | 90411 Nürnberg
> Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
> E-Mail: info at netlogix.de | Internet: http://www.netlogix.de
>
> netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 
> 13338) Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH 
> (HRB 20634)
> Umsatzsteuer-Identifikationsnummer: DE 233472254
> Geschäftsführer: Stefan Buchta, Matthias Schmidt
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-solr-bounces at lists.typo3.org [mailto:
> typo3-project-solr-bounces at lists.typo3.org] Im Auftrag von Hans Höchtl
> Gesendet: Montag, 13. Januar 2014 10:23
> An: Apache Solr search for TYPO3 project
> Betreff: Re: [TYPO3-Solr] Exclude page from result for blacklist 
> keywords
>
> Hi Philipp,
>
> oh I forgot, this is a missing feature which I built for our company. 
> If you post a feature request in Forge I will take care of this.
>
> Regards,
> Hans
>
>
> 2014/1/13 Philipp Bräutigam | Agenturwerft 
> <pbraeutigam at agenturwerft.de>
>
> > Hi Hans,
> >
> > thanks for your reply.
> >
> > This ist he way i have done it and it works perfectly with a static 
> > value like "plugin.tx_solr.search.query.filter.badKeywords = 
> > -badkeywords_textM:foo".
> >
> > How can i fill the filter with the search query parameter?
> >
> > Thanks,
> > Philipp
> >
> > -----Ursprüngliche Nachricht-----
> > Von: typo3-project-solr-bounces at lists.typo3.org [mailto:
> > typo3-project-solr-bounces at lists.typo3.org] Im Auftrag von Hans 
> > Höchtl
> > Gesendet: Montag, 13. Januar 2014 09:35
> > An: Apache Solr search for TYPO3 project
> > Betreff: Re: [TYPO3-Solr] Exclude page from result for blacklist 
> > keywords
> >
> > Hi Philipp,
> >
> > you can store the keywords where ever you want (extend TCA or IRRE). 
> > You configure your IndexQueue to index that field as a multivalue 
> > field badkeywords_textM  and add something like 
> > plugin.tx_solr.search.query.filter.badKeywords = 
> > -badkeywords_textM:searchTerm
> >
> > Best regards,
> > Hans
> >
> >
> > 2014/1/13 Philipp Bräutigam | Agenturwerft 
> > <pbraeutigam at agenturwerft.de>
> >
> > > Hey list,
> > >
> > > I'm searching for a solution to define a list of keywords in the 
> > > page properties for each page, which influence the search result 
> > > from my solr server. For example i want to add the keyword "foo" 
> > > to the page "bar" and i dont want to list this page in the results 
> > > when a user search for the keywory "foo" - do you have a solution 
> > > for that? With Sol ras a standalone solution it is not a problem, 
> > > but i dont have a idea how i can succeed with the TYPO3 solr extension.
> > >
> > > Thanks in advance,
> > > Philipp
> > > _______________________________________________
> > > TYPO3-project-solr mailing list
> > > TYPO3-project-solr at lists.typo3.org
> > > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
> > >
> >
> >
> >
> > --
> >
> > ---------------------------------
> > Hans Höchtl
> > Head of Development
> > ---------------------------------
> >
> > typovision GmbH
> > Elsenheimerstr. 7
> > 80687 München
> > ---------------------------------
> > Tel: +49 89 4520593 23 (Fax: -29)
> > http://www.typovision.de
> >  
> > <http://mailto%3Dhans.hoechtl@typovision.de/>hans.hoechtl at typovision
> > .de
> > ---------------------------------
> > Geschäftsführung:
> > Sebastian Böttger,
> >
> > Patrick Lobacher
> > Amtsgericht München, HRB 185695
> > ---------------------------------
> > _______________________________________________
> > TYPO3-project-solr mailing list
> > TYPO3-project-solr at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
> > _______________________________________________
> > TYPO3-project-solr mailing list
> > TYPO3-project-solr at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
> >
>
>
>
> --
>
> ---------------------------------
> Hans Höchtl
> Head of Development
> ---------------------------------
>
> typovision GmbH
> Elsenheimerstr. 7
> 80687 München
> ---------------------------------
> Tel: +49 89 4520593 23 (Fax: -29)
> http://www.typovision.de
>  
> <http://mailto%3Dhans.hoechtl@typovision.de/>hans.hoechtl at typovision.d
> e
> ---------------------------------
> Geschäftsführung:
> Sebastian Böttger,
>
> Patrick Lobacher
> Amtsgericht München, HRB 185695
> ---------------------------------
> _______________________________________________
> TYPO3-project-solr mailing list
> TYPO3-project-solr at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
> _______________________________________________
> TYPO3-project-solr mailing list
> TYPO3-project-solr at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
>



-- 

---------------------------------
Hans Höchtl
Head of Development
---------------------------------
typovision GmbH
Elsenheimerstr. 7

80687 München
---------------------------------
Tel: +49 89 4520593 23 (Fax: -29)
http://www.typovision.de
 <http://mailto%3Dhans.hoechtl@typovision.de/>hans.hoechtl at typovision.de
---------------------------------
Geschäftsführung:
Sebastian Böttger,

Patrick Lobacher
Amtsgericht München, HRB 185695
---------------------------------
_______________________________________________
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