Since it seems to be no voodoo available I did it on the client side.
I send a first request to get the facets and a second to get the documents and 
their highlighting.
It works well but requires more processing.

> ----------------------------------------
> From: Xavier SCHEPLER <xavier.schep...@sciences-po.fr>
> Sent: Thu Jan 20 10:59:40 CET 2011
> To: <solr-user@lucene.apache.org>
> Subject: Re: Local param tag voodoo ?
> 
> 
> Ok,
> I tryed to use nested queries this way:
> wt=json&indent=true&fl=qFR&q=sarkozy 
> _query_:"{!tag=test}chirac"&facet=true&facet.field={!ex=test}studyDescriptionId
> It resulted in this error:
> "facet_counts":{
>   "facet_queries":{},
>   "exception":"java.lang.NullPointerException\n\tat 
> org.apache.solr.request.SimpleFacets.parseParams(SimpleFacets.java:132)\n\tat 
> org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:278)\n\tat
>  
> org.apache.solr.request.SimpleFacets.getFacetCounts(SimpleFacets.java:166)\n\tat
>  
> org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:72)\n\tat
>  
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:195)\n\tat
>  
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)\n\tat
>  org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)\n\tat 
> org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)\n\tat
>  
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)\n\tat
>  
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)\n\tat
>  
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\n\tat
>  
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)\n\tat
>  
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)\n\tat
>  
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)\n\tat
>  
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)\n\tat
>  
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)\n\tat
>  
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)\n\tat
>  
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)\n\tat
>  
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)\n\tat
>  
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)\n\tat 
> java.lang.Thread.run(Thread.java:636)\n"}}
> 
> Then I tryed a simpler version:
> q={!tag=test}chirac&facet=true&facet.field={!ex=test}studyDescriptionId
> 
> It resulted in the same error.
> 
> 
> > ----------------------------------------
> > From: Jonathan Rochkind <rochk...@jhu.edu>
> > Sent: Wed Jan 19 17:38:53 CET 2011
> > To: solr-user@lucene.apache.org <solr-user@lucene.apache.org>
> > Subject: Re: Local param tag voodoo ?
> > 
> > 
> > What query are you actually trying to do?  There's probably a way to do 
> > it, possibly using nested queries -- but not using illegal syntax like 
> > some of your examples!  If you explain what you want to do, someone may 
> > be able to tell you how.  From the hints in your last message, I suspect 
> > nested queries _might_ be helpful to you.
> > 
> > On 1/19/2011 3:46 AM, Xavier SCHEPLER wrote:
> > > Ok I was already at this point.
> > > My facetting system use exactly what is described in this page. I read it 
> > > from the Solr 1.4 book. Otherwise I would'nt ask.
> > > The problem is that the filter queries doesn't affect the relevance score 
> > > of the results so I want the terms in the main query.
> > >
> > >
> > >> ----------------------------------------
> > >> From: Markus Jelsma<markus.jel...@openindex.io>
> > >> Sent: Tue Jan 18 21:31:52 CET 2011
> > >> To:<solr-user@lucene.apache.org>
> > >> Subject: Re: Local param tag voodoo ?
> > >>
> > >>
> > >> Hi,
> > >>
> > >> You get an error because LocalParams need to be in the beginning of a
> > >> parameter's value. So no parenthesis first. The second query should not 
> > >> give an
> > >> error because it's a valid query.
> > >>
> > >> Anyway, i assume you're looking for :
> > >> http://wiki.apache.org/solr/SimpleFacetParameters#Multi-
> > >> Select_Faceting_and_LocalParams
> > >>
> > >> Cheers,
> > >>
> > >>> Hey,
> > >>>
> > >>> here are my needs :
> > >>>
> > >>> - a query that has tagged and untagged contents
> > >>> - facets that ignore the tagged contents
> > >>>
> > >>> I tryed :
> > >>>
> > >>> q=({!tag=toExclude} ignored)  taken into account
> > >>> q={tag=toExclude v='ignored'} take into account
> > >>>
> > >>> Both resulted in a error.
> > >>>
> > >>> Is this possible or do I have to try another way ?
> > >
> > > --------------------------------------------------------------------------
> > > Tous les courriers électroniques émis depuis la messagerie
> > > de Sciences Po doivent respecter des conditions d'usages.
> > > Pour les consulter rendez-vous sur
> > > http://www.ressources-numeriques.sciences-po.fr/confidentialite_courriel.htm
> 
> 
> --------------------------------------------------------------------------
> Tous les courriers électroniques émis depuis la messagerie
> de Sciences Po doivent respecter des conditions d'usages.
> Pour les consulter rendez-vous sur
> http://www.ressources-numeriques.sciences-po.fr/confidentialite_courriel.htm


--------------------------------------------------------------------------
Tous les courriers électroniques émis depuis la messagerie
de Sciences Po doivent respecter des conditions d'usages.
Pour les consulter rendez-vous sur
http://www.ressources-numeriques.sciences-po.fr/confidentialite_courriel.htm

Reply via email to