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 Nishant Chandra <ni...@gmail.com> on 2009/07/24 16:43:27 UTC

Query

Hi,
I am trying to facet on the "description" field. I executed this query:
q=ipod&qt=dismax&fl=pid%2Crid%2Creview&facet=true&facet.field=review&facet.limit=10&facet.query=description%3Astorage&facet.query=description%3Ainterface&start=0&rows=20
I have 3 question:
1. If I have to search for a fixed string in only 1 field among many
records, how can I do it? Do I need to specify 'q' or 'fq' or both? e.g.
product id = "abc" is what I know. There is no query value.
2. The above query return "description:interface" and "description:storage"
along with other values. How can I suppress other values (pasted below)?
<lst name="facet_counts"><lst name="facet_queries"><int
name="description:storage">1</int><int
name="description:interface">4</int></lst><lst name="facet_fields"><lst
name="description"><int name="a">19</int><int name="i">19</int><int
name="nano">17</int><int name="ipod">16</int><int name="my">15</int><int
name="t">15</int><int name="you">15</int><int name="can">14</int><int
name="it">14</int><int name="appl">13</int></lst></lst><lst
name="facet_dates"/></lst>
3. Once I have these facet values like "<int
name="description:interface">4</int>", how should I frame the next query to
show only these 4 descriptions?
Please execuse if these questions are trivial. I am very new to solr.
Thanks,
Nishant Chandra
Hyderabad, India
Cell : +91 9949828480

Re: Query

Posted by Bill Au <bi...@gmail.com>.
1) not sure that you mean, can you give an example?

2) you can set facet.limit=0 to suppress the other values

3) add "description:interface" to the original query you used to obtain the
facet counts

Bill

On Fri, Jul 24, 2009 at 10:43 AM, Nishant Chandra <nishant.chandra@gmail.com
> wrote:

> Hi,
> I am trying to facet on the "description" field. I executed this query:
>
> q=ipod&qt=dismax&fl=pid%2Crid%2Creview&facet=true&facet.field=review&facet.limit=10&facet.query=description%3Astorage&facet.query=description%3Ainterface&start=0&rows=20
> I have 3 question:
> 1. If I have to search for a fixed string in only 1 field among many
> records, how can I do it? Do I need to specify 'q' or 'fq' or both? e.g.
> product id = "abc" is what I know. There is no query value.
> 2. The above query return "description:interface" and "description:storage"
> along with other values. How can I suppress other values (pasted below)?
> <lst name="facet_counts"><lst name="facet_queries"><int
> name="description:storage">1</int><int
> name="description:interface">4</int></lst><lst name="facet_fields"><lst
> name="description"><int name="a">19</int><int name="i">19</int><int
> name="nano">17</int><int name="ipod">16</int><int name="my">15</int><int
> name="t">15</int><int name="you">15</int><int name="can">14</int><int
> name="it">14</int><int name="appl">13</int></lst></lst><lst
> name="facet_dates"/></lst>
> 3. Once I have these facet values like "<int
> name="description:interface">4</int>", how should I frame the next query to
> show only these 4 descriptions?
> Please execuse if these questions are trivial. I am very new to solr.
> Thanks,
> Nishant Chandra
> Hyderabad, India
> Cell : +91 9949828480
>