Faceting on multiple fields, with multiple where clauses

2011-10-27 Thread Rubinho
hi,

I have the following situation:
- A dropdownlist to search trips by Country
- A dropdownlist to search trips by departureperiod (range/month)

I want to have facetresults on these fields.
When i select a value in 1 of the dropdownlists, i receive the correct
numbers (facets)
If Country = "Belgium", then i receive the original number of trips per
country and the number of trips per departuredate for Belgium.

But, when i combine this search with a country and a departureperiod, then i
expect to receive:
- the number of trips per country in the selected departureperiod (for first
dropdownlist)
AND
- the number of trips in the selected country (for second dropdownlist)

But for some reason, i can't get the correct values when i combine these 2
filters.
I receive the correct number of trips/period, but the countries aren't
filtered by this period anymore.
Can somebody explain me what i'm doing wrong?

This is the query for the combined search:
http://localhost:8080/solr/select/?facet=true&facet.date={!ex=SD}StartDate&f.StartDate.facet.date.start=2011-10-1T00:00:00Z&f.StartDate.facet.date.end=2012-09-30T00:00:00Z&facet.field={!ex=CC}CountryCode&f.StartDate.facet.date.gap=%2B1MONTH&rows=0&version=2.2&q={!tag=CC}CountryCode:ID&q={!tag=SD}StartDate:[2011-11-01T00:00:00Z
TO 2011-11-30T00:00:00Z]


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Faceting-on-multiple-fields-with-multiple-where-clauses-tp3457432p3457432.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Faceting on multiple fields, with multiple where clauses

2011-10-27 Thread Rubinho
Hi Erik,

Thank you very much.
Your hint did solve the problem.

Acutally, i don't understand why (i read the difference between Q and QF,
but it's still not clear to me why it did'nt work with Q).

But it's solved, that's the most important :)


Thanks,
Ruben

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Faceting-on-multiple-fields-with-multiple-where-clauses-tp3457432p3457569.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Faceting on multiple fields, with multiple where clauses

2011-10-28 Thread Rubinho
Thank you Erik,
Now i understand the difference between Q and QF.

Unfortunately, there is 1 unsolved problem left (didn't find the answer
yesterday evening).

I added grouping on this query, because i want to show a group of trips with
the same code only once. (A trip has multiple departure days, and i just
want to show 1 trip, while in de detail screen, i'll show all the available
trips (departure dates).

When i don't filter by country, i receive all countries with their correct
count.
When i do a filter by country, the count of my countries isn't grouped
anymore

When i get the number of trips/month, i just get numbers for the next 2
months and no numbers for the other months (the trip should appear here each
time in a month, because they have departures in each)

Can you help me again?
I'll appreciate it very much :)

http://localhost:8080/solr/select?facet=true&facet.date={!ex=SD}StartDate&f.StartDate.facet.date.start=2011-10-01T00:00:00Z&f.StartDate.facet.date.end=2012-09-30T00:00:00Z&f.StartDate.facet.date.gap=%2B1MONTH&facet.field={!ex=CC}CountryCode&rows=0&version=2.2&q=*:*&group=true&group.field=RoundtripgroupCode&group.truncate=true

These parts of the query are added when a selection is made:
&fq={!tag=CC}CountryCode:CR
&fq={!tag=SD}StartDate:[2011-10-01T00:00:00Z TO 2011-10-31T00:00:00Z]




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Faceting-on-multiple-fields-with-multiple-where-clauses-tp3457432p3460934.html
Sent from the Solr - User mailing list archive at Nabble.com.


Facet count in grouped results

2011-10-31 Thread Rubinho
Hi,

I'm working on a travelwebsite and want create the whole search with Solr.

I added grouping on the query, because i want to show a group of trips with
the same ID (roundtripgroupcode) only once.
A trip has multiple departure days, and i just want to show 1 trip, while in
de detail screen, i'll show all available departure dates.

So, a table has following fields:
RoundtripgroupCode, CountryCode, DepartureDate, and other less important
fields
The real ID of a trip is the field 'RoundtripgroupCode'

When i don't filter by country, i receive all countries with their correct
count. 
When i do a filter by country, the count of my countries isn't grouped
anymore 

When i get the number of trips/month, i just get numbers for the next 2
months and no numbers for the other months (the trip should appear here each
time in a month, because they have departures in each) 

Can you help me please? 

http://localhost:8080/solr/select?facet=true&facet.date={!ex=SD}StartDate&f.StartDate.facet.date.start=2011-10-01T00:00:00Z&f.StartDate.facet.date.end=2012-09-30T00:00:00Z&f.StartDate.facet.date.gap=%2B1MONTH&facet.field={!ex=CC}CountryCode&rows=0&version=2.2&q=*:*&group=true&group.field=RoundtripgroupCode&group.truncate=true
 

These parts of the query are added when a selection is made: 
&fq={!tag=CC}CountryCode:CR 
&fq={!tag=SD}StartDate:[2011-10-01T00:00:00Z TO 2011-10-31T00:00:00Z] 

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Facet-count-in-grouped-results-tp3467224p3467224.html
Sent from the Solr - User mailing list archive at Nabble.com.


Facet counts incorrect on filtered field when using groups

2011-11-10 Thread Rubinho
Hi,

I have a problem with facets on a grouped field.

Ex: SolR has 3 records, 2 records with the same RountripgroupCode and
CountryCode ("MA"), and 1 record with another roundtripgroupCode and another
CountryCode ("ID").
Because i use grouping, i should have only have 1 result in MA and 1 result
in ID.
When executing the query below, i get a facetresult of 2 on the CountryCode
MA (it should be 1) and 1 on ID.

If i remove the line fq={!tag=CC}CountryCode:MA, then the facetresults are
correct: 1 for each CountryCode.

How can i solve this, so that i'll have the same result with filter on
Countrycode?


http://zrheab21:9090/solr/select?
facet=true&
facet.field={!ex=CC}CountryCode&
facet.field=IsBeach&
fq={!tag=CC}CountryCode:MA&
group=true&
group.truncate=true&
group.field=RoundtripgroupCode&
q=*:*



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Facet-counts-incorrect-on-filtered-field-when-using-groups-tp3496683p3496683.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Facet counts incorrect on filtered field when using groups

2011-11-12 Thread Rubinho
Hi Erick,

Well, these records are trips, each trip has multiple variants
(departuredates, number of days). Each variant has his own record. 
Grouping is used to show only 1 record/trip.

When you search in this minidatabase (with 3 records) without a fq, then you
receive 1 facetcount (grouped by the tripcode) for the country 'MA'. But if
you have specified in the searchfields to search for trips in the country
'MA' (just adding &facet.query={!tag=CC}CountryCode:MA), then i receive a
count of 2 for this Country. This is the number of the records and not of
the grouped items.

The reason i use &facet.query={!tag=CC}CountryCode:MA is explained here: 
http://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters
http://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters 


Maybe, the system doesn't know that each record in the same group has the
same CountryCode. I think this is maybe the reason why i get not the
expected results.

It's difficult to put the Solr instance online, but here are the results as
you asked: http://users.telenet.be/rgekiere/solr/
http://users.telenet.be/rgekiere/solr/  

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Facet-counts-incorrect-on-filtered-field-when-using-groups-tp3496683p3502145.html
Sent from the Solr - User mailing list archive at Nabble.com.