lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alvaro Cabrerizo <>
Subject Re: Newly observed Facets
Date Tue, 20 Jan 2015 07:45:53 GMT
At first impression, everything seems ok.

Anyway, is the startTimeISO single-value or multivalued field? In case it
is single-value the clause startTimeISO:["2015-01-19T00:
00:00.000Z" TO "2015-01-20T00:00:00.000Z"]" is sufficient to exclude other
period of time. I also guess that the startTimeISO fieldtype is date.

Other option for rewriting your query (just for testing as I can't find any
problem in the query you presented)

fq=startTimeISO:[NOW/DAY-1DAYS TO NOW]
raw parameters: facet.pivot=userName,startTimeISO

It will be also helpful to know the raw response, just to discard that the
name bla doesnt appear in different documents. For example usin:

query: userName:bla
fq=startTimeISO:[NOW/DAY-1DAYS TO NOW]
fl= id,userName, startTimeISO

Hope it helps.

On Tue, Jan 20, 2015 at 5:09 AM, harish singh <>

> Hi,
> I have asked a question on Stackoverflow:
> I searched the mailing list and found that not many reply there. So asking
> the same question here:
>  have two fields in my solr index data: "userName" and "startTimeISO" along
> with many other fields. Now I want to query for all the "userNames" that
> were seen TODAY but not seen in the last 30 days. Basically, I am trying to
> find out Newly Observed UserNames for today.
> Now the Solr Facet query I am running is:
> facet.pivot: "userName,startTimeISO",
> fq: " NOT startTimeISO:["2014-12-20T00:00:00.000Z" TO
> "2015-01-18T00:00:00.000Z"] AND
> startTimeISO:["2015-01-19T00:00:00.000Z" TO
> "2015-01-20T00:00:00.000Z"]"
> But I am for some reason getting incorrect results. For example, I see
> userName: "bla" the above query. If I run the same query for tomorrow, I am
> again see "bla" in my Facet Results.
> I am some how not able to get the correct logic. Perhaps I am not using all
> the tools provided by solr, which I am unaware of?
> Can someone help me here? I dont mind testing all of your suggestions and
> coming back and forth with different suggestions.
> Thanks,
> Harish

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message