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 Pierre Auslaender <pa...@yahoo.com> on 2008/08/16 18:50:53 UTC

Localisation, faceting

Hello,

I have a couple of questions:

1/ Is it possible to localise query operator names without writing code? 
For instance, I'd like to issue queries with French operator names, e.g. 
ET (instead of AND), OU (instead of OR), etc.

2/ Is it possible for Solr to generate, in the XML response, the URLs or 
complete queries for each facet in a faceted search?

Here's an example. Say my first query is :
http://localhost:8080/solr/select?q=bac&facet=true&facet.field=kind&facet.limit=-1

The "kind" field has three values: material, immaterial, time. I get 
back something like this:

    <lst name="facet_counts">
        <lst name="facet_queries" />
        <lst name="facet_fields">
            <lst name="kind">
                <int name="material">1024</int>
                <int name="immaterial">27633</int>
                <int name="time">389</int>
            </lst>
        </lst>
    </lst>

If I want to drill down into one facet, say into "material", I have to 
"manually" rebuild a query like this:
http://localhost:8080/solr/select?q=bac&facet=true&facet.field=kind&facet.limit=-1&fq=kind:"material"

It's not too difficult, but surely Solr could add this URL or query 
string under the "material" element. Is this possible? Or do I have to 
XSLT the result myself?

Thanks,

Pierre Auslaender

Re: Localisation, faceting

Posted by Pierre Auslaender <pa...@yahoo.com>.
Thanks a lot for the reply.

I thought, might be a good idea to sort of override operator names, same 
like stop words, stems, etc. I guess I'd need to parse the query string?

As for keeping state between requests, there's always going to be some 
state going in order to have a drill-down session on facets. All 
interesting state properties are actually in the Solr reponse, e.g. 
queries, facets, start row, etc. Would save me some Javascript if the 
facet URL was there as well... (no big fan of javascript...)



Shalin Shekhar Mangar a écrit :
> On Sat, Aug 16, 2008 at 10:20 PM, Pierre Auslaender <pa...@yahoo.com>wrote:
>
>   
>> 1/ Is it possible to localise query operator names without writing code?
>> For instance, I'd like to issue queries with French operator names, e.g. ET
>> (instead of AND), OU (instead of OR), etc.
>>     
>
>
> No, your application must do it before sending the query to Solr.
>
>
>   
>> 2/ Is it possible for Solr to generate, in the XML response, the URLs or
>> complete queries for each facet in a faceted search?
>>
>> It's not too difficult, but surely Solr could add this URL or query string
>> under the "material" element. Is this possible? Or do I have to XSLT the
>> result myself?
>>     
>
>
> No, Solr does not do that. However generating them from Solr is a good idea
> only if you are able to keep the state across requests.
>
>   

Re: Localisation, faceting

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Sat, Aug 16, 2008 at 10:20 PM, Pierre Auslaender <pa...@yahoo.com>wrote:

> 1/ Is it possible to localise query operator names without writing code?
> For instance, I'd like to issue queries with French operator names, e.g. ET
> (instead of AND), OU (instead of OR), etc.


No, your application must do it before sending the query to Solr.


>
> 2/ Is it possible for Solr to generate, in the XML response, the URLs or
> complete queries for each facet in a faceted search?
>
> It's not too difficult, but surely Solr could add this URL or query string
> under the "material" element. Is this possible? Or do I have to XSLT the
> result myself?


No, Solr does not do that. However generating them from Solr is a good idea
only if you are able to keep the state across requests.

-- 
Regards,
Shalin Shekhar Mangar.