You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by clico <cl...@mairie-marseille.fr> on 2009/09/01 08:35:12 UTC
Drill down into hierarchical facet : how to?
Hello
I'm looking for a way to do that
I have a hierachical facet
ex : Continent / Country / City / Blok
Europe/France/Paris/Saint Michel
America/USA/NYC/Chelsea
etc ...
I have some points of interest tagged in differents level of a same tree
ex : some POI can be tagged Saint Michel and other tagged Paris etc ...
I facet on a fiel "location". This i a fiel stored like this
Continent/Country/City/Blok
I want to drill down on this facet during the search and show the facets for
the next level of a level
Ex :
When I search at the level continent I want to facet the level Europe, USA
etc ...
and to show all the results (Europe contains POI tagged as Europe and POI
tagged as France for example)
I know I can make a facet query
something like Europe/France/* to search all POI in France
but how can I show the facet level under France (Paris, Lyon etc ...) ???
Thank u
--
View this message in context: http://www.nabble.com/Drill-down-into-hierarchical-facet-%3A-how-to--tp25235058p25235058.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: solrj - Log4j and slf4j integration -
java.lang.IllegalStateException thrown
Posted by "Smiley, David W." <ds...@mitre.org>.
Are you running the latest versions of these logging libraries? I see nothing in the 1.5.8 SLF4J Log4j adapter that would cause this.
~ David Smiley
Author: http://www.packtpub.com/solr-1-4-enterprise-search-server
On 9/1/09 10:49 AM, "Villemos, Gert" <ge...@logica.com> wrote:
We are using solrj 1.3 (with slf4j) in a client also using Aperture
(with log4j 1.2.14). When executing a query I get the error shown below.
The request is never received by the server, i.e. the exception is
thrown before the request is issued.
I think I'm running into a compatibility issue between slf4j and log4j,
but don't know how to solve it.
Regards,
Gert.
--- Stack Trace ------------------------
org.apache.solr.client.solrj.SolrServerException: Error executing query
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.j
ava:96)
at
org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:109)
at
org.esa.huginn.solr.SolrContainer.getNext(SolrContainer.java:105)
at
org.esa.huginn.commons.container.consolidationstrategies.SynonymReplacem
entConsolidator.execute(SynonymReplacementConsolidator.java:191)
at
org.esa.huginn.filesystemcrawler.FileSystemCrawlerContext.initialize(Fil
eSystemCrawlerContext.java:134)
at
org.esa.huginn.filesystemcrawler.FileSystemCrawlerContext.main(FileSyste
mCrawlerContext.java:63)
Caused by: java.lang.IllegalStateException: Level number 10 is not
recognized.
at
org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:421)
at
org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocatio
nAwareLog.java:106)
at
org.apache.commons.httpclient.HttpConnection.releaseConnection(HttpConne
ction.java:1178)
at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon
nectionAdapter.releaseConnection(MultiThreadedHttpConnectionManager.java
:1423)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:222)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
97)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
23)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsH
ttpSolrServer.java:335)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsH
ttpSolrServer.java:183)
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.j
ava:90)
Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu sch?tzen. / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
solrj - Log4j and slf4j integration - java.lang.IllegalStateException thrown
Posted by "Villemos, Gert" <ge...@logica.com>.
We are using solrj 1.3 (with slf4j) in a client also using Aperture
(with log4j 1.2.14). When executing a query I get the error shown below.
The request is never received by the server, i.e. the exception is
thrown before the request is issued.
I think I'm running into a compatibility issue between slf4j and log4j,
but don't know how to solve it.
Regards,
Gert.
--- Stack Trace ------------------------
org.apache.solr.client.solrj.SolrServerException: Error executing query
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.j
ava:96)
at
org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:109)
at
org.esa.huginn.solr.SolrContainer.getNext(SolrContainer.java:105)
at
org.esa.huginn.commons.container.consolidationstrategies.SynonymReplacem
entConsolidator.execute(SynonymReplacementConsolidator.java:191)
at
org.esa.huginn.filesystemcrawler.FileSystemCrawlerContext.initialize(Fil
eSystemCrawlerContext.java:134)
at
org.esa.huginn.filesystemcrawler.FileSystemCrawlerContext.main(FileSyste
mCrawlerContext.java:63)
Caused by: java.lang.IllegalStateException: Level number 10 is not
recognized.
at
org.slf4j.impl.Log4jLoggerAdapter.log(Log4jLoggerAdapter.java:421)
at
org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocatio
nAwareLog.java:106)
at
org.apache.commons.httpclient.HttpConnection.releaseConnection(HttpConne
ction.java:1178)
at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon
nectionAdapter.releaseConnection(MultiThreadedHttpConnectionManager.java
:1423)
at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:222)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
97)
at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
23)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsH
ttpSolrServer.java:335)
at
org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsH
ttpSolrServer.java:183)
at
org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.j
ava:90)
Please help Logica to respect the environment by not printing this email / Pour contribuer comme Logica au respect de l'environnement, merci de ne pas imprimer ce mail / Bitte drucken Sie diese Nachricht nicht aus und helfen Sie so Logica dabei, die Umwelt zu sch�tzen. / Por favor ajude a Logica a respeitar o ambiente nao imprimindo este correio electronico.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Re: Drill down into hierarchical facet : how to?
Posted by Uri Boness <ub...@gmail.com>.
Hi,
You know the level your currently in:
America/USA
You have the values for the location facet in the form:
America/USA/NYC/Chelsea...................................3
America/USA/NYC/East Village............................2
America/USA/San Francisco/Haight-Ashbury.......5
America/USA/Los Angeles/Hollywood..................1
Why can't you do the following:
first step: translate each facet value to the next expected level, that is:
America/USA/NYC.................................................3
America/USA/NYC.................................................2
America/USA/San Francisco.................................5
America/USA/Los Angeles.....................................1
(this can easily be done using regular expression)
second step: aggregate the counts for similar values:
America/USA/NYC.................................................5
America/USA/San Francisco.................................5
America/USA/Los Angeles.....................................1
now, use the last "part" of the value path as display name, and use the
whole value path as a filter (with a wildcard of course).
You can also have a look at this issue:
http://issues.apache.org/jira/browse/SOLR-64
cheers,
Uri
clico wrote:
> Hello
>
> I'm looking for a way to do that
>
> I have a hierachical facet
>
> ex : Continent / Country / City / Blok
>
>
> Europe/France/Paris/Saint Michel
> America/USA/NYC/Chelsea
> etc ...
>
> I have some points of interest tagged in differents level of a same tree
> ex : some POI can be tagged Saint Michel and other tagged Paris etc ...
>
> I facet on a fiel "location". This i a fiel stored like this
> Continent/Country/City/Blok
>
>
>
> I want to drill down on this facet during the search and show the facets for
> the next level of a level
>
>
> Ex :
>
> When I search at the level continent I want to facet the level Europe, USA
> etc ...
> and to show all the results (Europe contains POI tagged as Europe and POI
> tagged as France for example)
>
>
>
> I know I can make a facet query
> something like Europe/France/* to search all POI in France
> but how can I show the facet level under France (Paris, Lyon etc ...) ???
>
>
> Thank u
>
>
Re: Drill down into hierarchical facet : how to?
Posted by Chris Hostetter <ho...@fucit.org>.
: I know I can make a facet query
: something like Europe/France/* to search all POI in France
: but how can I show the facet level under France (Paris, Lyon etc ...) ???
i don't fully understand your question, so i'm not sure if you mean
"filter query" (fq) instead of "facet query" (facet.query) but if you are
using facet=location, then facet.prefix can help you ensure that you
only return values that start with Europe/France
you may also be interested in this thread...
http://www.nabble.com/Re%3A-Hierarchical-Faceting-p20176326.html
-Hoss