Re: Faceting Query in Solr

2013-12-08 Thread kumar
It's working fine.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Faceting-Query-in-Solr-tp4104881p4105612.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Faceting Query in Solr

2013-12-05 Thread Ahmet Arslan
how about fq={!lucene q.op=OR}categoryId:(800 900)



On Thursday, December 5, 2013 1:26 PM, kumar  wrote:
 
I used following url...

http://localhost:8080/solr/Testing/select?q=*:*&wt=xml&indent=true&facet=true&facet.field=categoryId&fq=categoryId:(900

800)

but it is not showing any results



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Faceting-Query-in-Solr-tp4104881p4105106.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Faceting Query in Solr

2013-12-05 Thread kumar
It is working fine for fq=categoryId:(800 900)



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Faceting-Query-in-Solr-tp4104881p4105110.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Faceting Query in Solr

2013-12-05 Thread kumar
I used following url...

http://localhost:8080/solr/Testing/select?q=*:*&wt=xml&indent=true&facet=true&facet.field=categoryId&fq=categoryId:(900
800)

but it is not showing any results



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Faceting-Query-in-Solr-tp4104881p4105106.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Faceting Query in Solr

2013-12-05 Thread Mikhail Khludnev
On Thu, Dec 5, 2013 at 1:34 PM, kumar  wrote:

> fq=categoryId:800&fq=categoryId:900
>

what about fq=categoryId:(800 900)
?



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics





Re: Faceting Query in Solr

2013-12-05 Thread kumar

Hi i am using following two queries but i am not getting the out put as
expected

http://localhost:8080/solr/Testing/select?q=*%3A*&wt=xml&indent=true&facet=true&facet.field=categoryId

for the above query it is showing all the matched results as

category1(Id-900)--10002
category2(Id-800)--5202
category3(Id-700)--1500

http://localhost:8080/solr/Testing/select?q=*:*&wt=xml&indent=true&facet=true&facet.field=categoryId&facet.query=categoryId:900

This has to show only results of categoryId 900 results i.e numfound must be
10002

http://localhost:8080/solr/Testing/select?q=*:*&wt=xml&indent=true&facet=true&facet.field=categoryId&facet.query=categoryId:900&facet.query=categoryId:800

It has to show results of both categories i.e 10002+5202=total 15204
records.

But it showing all the category records


and if i use the fq=categoryId:800&fq=categoryId:900 then it not showing any
results.




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Faceting-Query-in-Solr-tp4104881p4105083.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Faceting Query in Solr

2013-12-04 Thread Erick Erickson
The standard way of handling this kind of thing is with
filter queries. For multi-select, you have to put in some
javascript or something to make an OR clause when they
check the boxes.

So your query looks like fq=categoryID:(1 OR 2 OR 3)
rather than
fq=categoryID:1&fq=categoryID:2&fq=categoryID:3

Best,
Erick


On Wed, Dec 4, 2013 at 4:36 AM, kumar  wrote:

> Hi,
>
> I indexed data into solr by using 5 categories. Each category is
> differentiated by categoryId. Now i have a situation that i need to show
> the
> results based on facets.
>
> Ex:
>
> []-category1
> []-category2
> []-category3
> []-category4
> []-category5
>
>
> If the user checks the category1 it has to show the results based on
> categoryId-1
>
> If the user checks 2 categories it has to show the results from two
> categories which the user checked
>
> If the user checks 3 categories it has to show the results from three
> categories
>
> and son on.like how many categories user checked i have to show results
> from checked categories
>
> My Schema is in the following way..
>
>  multiValued="false" />
>  required="true" />
>  required="true"
> />
>  multiValued="true" required="true" />
>
>
> Anyone help me how can i achieve this.
>
> Regards,
> Kumar
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Faceting-Query-in-Solr-tp4104881.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


Re: Faceting Query

2011-02-14 Thread rajini maski
I am also working on same feature of solr 4.0

And I have doubt in the results am getting. I will post the cases here. If
anyone know why is it so,Please revert back...

I run a normal facet query with q parameter q=*:*  and did facet=on
&facet.field=stock&facet.filed=place&facet.field=quantity&facet.mincout=1

Results  i got is-


10
10
10
10


10
10


10
10



Now when I am doing this facet.pivot query with same q paramater (q= *:* )and
same data set ..
query - facet.pivot=stock,place,quality&facet.mincout=1

Result I get is like this-














The point is .. Why I am not getting result hirearchy for "wheat" when it is
coming in the flat faceting above.

Awaiting reply

Regards,
Rajani Maski




On Mon, Feb 14, 2011 at 4:18 PM, rajini maski  wrote:

> This feature works in SOLR 4.0 release.
>
> You can follow this link for knowing how it works...
>
> Click 
> here
>
>
>
> Regards
> Rajani Maski
>
>
> On Mon, Feb 14, 2011 at 4:05 PM, Isha Garg  wrote:
>
>> On Friday 11 February 2011 11:34 PM, Gora Mohanty wrote:
>>
>>> On Thu, Feb 10, 2011 at 12:21 PM, Isha Garg
>>>  wrote:
>>>
>>>
 What is facet.pivot field? PLz explain with example


>>> Does http://wiki.apache.org/solr/SimpleFacetParameters#facet.pivot not
>>> help?
>>>
>>> Regards,
>>> Gora
>>>
>>>
>>
>> No, it is not showing any pivot results in my case
>>
>>
>> http://localhost:8984/solr/worldNews/select/?q=*%3A*&version=2.2&start=0&rows=0&indent=on&facet.pivot=category,country,KeyLocation&facet.pivot=country,category&facet=true&facet.field=category&&wt=json
>>
>> Output is:
>>
>> {
>>  "responseHeader":{
>>  "status":0,
>>  "QTime":1,
>>  "params":{
>>"facet":"true",
>>"indent":"on",
>>"start":"0",
>>"q":"*:*",
>>"facet.field":"category",
>>"wt":"json",
>>"facet.pivot":["category,country,KeyLocation",
>> "country,category"],
>>"version":"2.2",
>>"rows":"0"}},
>>  "response":{"numFound":6775,"start":0,"docs":[]
>>  },
>>  "facet_counts":{
>>  "facet_queries":{},
>>  "facet_fields":{
>>"category":[
>> "Counterfeiting and Piracy ",2367,
>> "Social Unrest ",2143,
>> "Security Measures ",1064,
>> "Fraud and Cheating",356,
>> "Naxelites ",266,
>> "Terrorism ",243,
>> "Sex Crime ",232,
>> "Shiv Sena ",76,
>> "Major Crime   ",23,
>> "Drug Running and Organized Crime  ",5]},
>>  "facet_dates":{}}}
>>
>>
>>
>


Re: Faceting Query

2011-02-14 Thread rajini maski
This feature works in SOLR 4.0 release.

You can follow this link for knowing how it works...

Click 
here



Regards
Rajani Maski


On Mon, Feb 14, 2011 at 4:05 PM, Isha Garg  wrote:

> On Friday 11 February 2011 11:34 PM, Gora Mohanty wrote:
>
>> On Thu, Feb 10, 2011 at 12:21 PM, Isha Garg  wrote:
>>
>>
>>> What is facet.pivot field? PLz explain with example
>>>
>>>
>> Does http://wiki.apache.org/solr/SimpleFacetParameters#facet.pivot not
>> help?
>>
>> Regards,
>> Gora
>>
>>
>
> No, it is not showing any pivot results in my case
>
>
> http://localhost:8984/solr/worldNews/select/?q=*%3A*&version=2.2&start=0&rows=0&indent=on&facet.pivot=category,country,KeyLocation&facet.pivot=country,category&facet=true&facet.field=category&&wt=json
>
> Output is:
>
> {
>  "responseHeader":{
>  "status":0,
>  "QTime":1,
>  "params":{
>"facet":"true",
>"indent":"on",
>"start":"0",
>"q":"*:*",
>"facet.field":"category",
>"wt":"json",
>"facet.pivot":["category,country,KeyLocation",
> "country,category"],
>"version":"2.2",
>"rows":"0"}},
>  "response":{"numFound":6775,"start":0,"docs":[]
>  },
>  "facet_counts":{
>  "facet_queries":{},
>  "facet_fields":{
>"category":[
> "Counterfeiting and Piracy ",2367,
> "Social Unrest ",2143,
> "Security Measures ",1064,
> "Fraud and Cheating",356,
> "Naxelites ",266,
> "Terrorism ",243,
> "Sex Crime ",232,
> "Shiv Sena ",76,
> "Major Crime   ",23,
> "Drug Running and Organized Crime  ",5]},
>  "facet_dates":{}}}
>
>
>


Re: Faceting Query

2011-02-14 Thread Upayavira
Likely because it is a Solr 4.0 feature and you are using Solr 1.4.1.
That'd be my guess.

(Solr 4.0 is the latest greatest as yet unreleased version of Solr -
numbering scheme changed to fit with that of Lucene).

Upayavira

On Mon, 14 Feb 2011 16:05 +0530, "Isha Garg" 
wrote:
> On Friday 11 February 2011 11:34 PM, Gora Mohanty wrote:
> > On Thu, Feb 10, 2011 at 12:21 PM, Isha Garg  wrote:
> >
> >> What is facet.pivot field? PLz explain with example
> >>  
> > Does http://wiki.apache.org/solr/SimpleFacetParameters#facet.pivot not help?
> >
> > Regards,
> > Gora
> >
> 
> No, it is not showing any pivot results in my case
> 
> http://localhost:8984/solr/worldNews/select/?q=*%3A*&version=2.2&start=0&rows=0&indent=on&facet.pivot=category,country,KeyLocation&facet.pivot=country,category&facet=true&facet.field=category&&wt=json
> 
> Output is:
> 
> {
>   "responseHeader":{
>"status":0,
>"QTime":1,
>"params":{
>   "facet":"true",
>   "indent":"on",
>   "start":"0",
>   "q":"*:*",
>   "facet.field":"category",
>   "wt":"json",
>   "facet.pivot":["category,country,KeyLocation",
>"country,category"],
>   "version":"2.2",
>   "rows":"0"}},
>   "response":{"numFound":6775,"start":0,"docs":[]
>   },
>   "facet_counts":{
>"facet_queries":{},
>"facet_fields":{
>   "category":[
>"Counterfeiting and Piracy ",2367,
>"Social Unrest ",2143,
>"Security Measures ",1064,
>"Fraud and Cheating",356,
>"Naxelites ",266,
>"Terrorism ",243,
>"Sex Crime ",232,
>"Shiv Sena ",76,
>"Major Crime   ",23,
>"Drug Running and Organized Crime  ",5]},
>"facet_dates":{}}}
> 
> 
> 
--- 
Enterprise Search Consultant at Sourcesense UK, 
Making Sense of Open Source



Re: Faceting Query

2011-02-14 Thread Isha Garg

On Friday 11 February 2011 11:34 PM, Gora Mohanty wrote:

On Thu, Feb 10, 2011 at 12:21 PM, Isha Garg  wrote:
   

What is facet.pivot field? PLz explain with example
 

Does http://wiki.apache.org/solr/SimpleFacetParameters#facet.pivot not help?

Regards,
Gora
   


No, it is not showing any pivot results in my case

http://localhost:8984/solr/worldNews/select/?q=*%3A*&version=2.2&start=0&rows=0&indent=on&facet.pivot=category,country,KeyLocation&facet.pivot=country,category&facet=true&facet.field=category&&wt=json

Output is:

{
 "responseHeader":{
  "status":0,
  "QTime":1,
  "params":{
"facet":"true",
"indent":"on",
"start":"0",
"q":"*:*",
"facet.field":"category",
"wt":"json",
"facet.pivot":["category,country,KeyLocation",
 "country,category"],
"version":"2.2",
"rows":"0"}},
 "response":{"numFound":6775,"start":0,"docs":[]
 },
 "facet_counts":{
  "facet_queries":{},
  "facet_fields":{
"category":[
 "Counterfeiting and Piracy ",2367,
 "Social Unrest ",2143,
 "Security Measures ",1064,
 "Fraud and Cheating",356,
 "Naxelites ",266,
 "Terrorism ",243,
 "Sex Crime ",232,
 "Shiv Sena ",76,
 "Major Crime   ",23,
 "Drug Running and Organized Crime  ",5]},
  "facet_dates":{}}}




Re: Faceting Query

2011-02-11 Thread Gora Mohanty
On Thu, Feb 10, 2011 at 12:21 PM, Isha Garg  wrote:
> What is facet.pivot field? PLz explain with example

Does http://wiki.apache.org/solr/SimpleFacetParameters#facet.pivot not help?

Regards,
Gora


Re: Faceting Query

2011-02-11 Thread Gora Mohanty
On Thu, Feb 10, 2011 at 12:00 PM, Isha Garg  wrote:
> Hi,
>      What is the significance of copy field  when used in faceting . plz
> explain with example.

Not sure what you mean here. Could you provide details?

Regards,
Gora