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 gi...@gmx.de on 2008/11/07 14:23:06 UTC
Re: Calculating peaks - solrj support for facet.date?
Sorry, but I have one more question. Does the java client solrj support facet.date?
QueryResponse knows the getFacetDates() method but I don't understand how to set facet.date, facet.date.start, facet.date.end, and facet.date.gap for the query. It seems that SolrQuery doesn't provide functions for this purpose.
It would be very nice if you could post some code examples.
Thanks again
Simon
-------- Original-Nachricht --------
Datum: Thu, 06 Nov 2008 22:08:35 +0100
Von: gistolero@gmx.de
An: solr-user@lucene.apache.org
Betreff: Re: Calculating peaks
Thank you, Erik. Thats what I need. Sorry, I missed the 'facet' chapter.
-------- Original-Nachricht --------
> Datum: Thu, 6 Nov 2008 05:07:39 -0600
> Von: Erik Hatcher <er...@ehatchersolutions.com>
> An: solr-user@lucene.apache.org
> Betreff: Re: Calculating peaks
> Would faceting on date (&facet.field=date&facet=on) satisfy your
> need? It'll give you back all the dates and frequencies of them
> within the matched results.
>
> Erik
>
> On Nov 6, 2008, at 4:59 AM, gistolero@gmx.de wrote:
> > How can I get ALL the matching documents back? How can I return an
> > unlimited number of rows?
> > Yes, I have read the FAQ and I got your point, but I need Solr to
> > calculate number based peaks for my indexed data:
> >
> > - For each of my documents the text ('text'), the creation time
> > ('date') and other fields are saved. But for this query I'm only
> > using 'text' and 'date'!
> > - If the query string is found in 'text', Solr returns only the
> > value from 'date' (not from 'text').
> > - My application uses a map to store all returned dates and to count
> > the frequency of occurrence.
> > - The application uses the map for calculating peaks.
> >
> >
> > Two questions:
> >
> > ===> Is it possible to return _all_ documents, if the query response
> > contains only one small field ('date')?
> >
> > ===> Do you have an hints for tuning such a query? I am using the
> > 'fl=date' parameter. Is there a better way?
> >
> >
> > Thanks a lot
> > Gisto
> > --
> > Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
> > Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
Re: Calculating peaks - solrj support for facet.date?
Posted by "Aleksander M. Stensby" <al...@integrasco.no>.
As Erik said, you can just set the parameters yourself
SolrQuery query = new SolrQuery(...);
query.set(FacetParams.FACET_DATE, ...);
etc.
You'll find all facet-related parameters in the FacetParams interface,
located in the org.apache.solr.common.params package.
- Aleks
On Fri, 07 Nov 2008 14:26:56 +0100, Erik Hatcher
<er...@ehatchersolutions.com> wrote:
>
> On Nov 7, 2008, at 7:23 AM, gistolero@gmx.de wrote:
>> Sorry, but I have one more question. Does the java client solrj support
>> facet.date?
>
> Yeah, but it doesn't have explicit setters for it. A SolrQuery is also
> a ModifiableSolrParams - so you can call the add/set methods on it using
> the same keys used with HTTP requests.
>
> Erik
>
>
--
Aleksander M. Stensby
Senior software developer
Integrasco A/S
Re: Calculating peaks - solrj support for facet.date?
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Nov 7, 2008, at 7:23 AM, gistolero@gmx.de wrote:
> Sorry, but I have one more question. Does the java client solrj
> support facet.date?
Yeah, but it doesn't have explicit setters for it. A SolrQuery is
also a ModifiableSolrParams - so you can call the add/set methods on
it using the same keys used with HTTP requests.
Erik