fq with standard request handler

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

fq with standard request handler

Otis Gospodnetic-2
Hi,

I'm trying to use 'fq' param (see http://wiki.apache.org/solr/CommonQueryParameters ) with the standard request handler, using a field that is defined as an integer (values 1 or 0), is indexed, and is stored.  For some reason, these two return no hits, even though I do have MyIntField with values 0 and 1 in the index:

  http://localhost:8080/solr/select?q=birds&fq=MyIntField:0
  http://localhost:8080/solr/select?q=birds&fq=MyIntField:1


So I tried these, just to see if that makes any difference:
  http://localhost:8080/solr/select?q=birds%20AND%20MyIntField:0
  http://localhost:8080/solr/select?q=birds%20AND%20MyIntField:1
  http://localhost:8080/solr/select?q=birds%20AND%20MyIntField:[* TO *]

No go - no hits.  Am I doing something obviously wrong?  I'm using a Solr nightly from maybe a month ago.  I don't recall seeing any bugs with the 'fq' param.

Thanks,
Otis


Reply | Threaded
Open this post in threaded view
|

Re: fq with standard request handler

Mike Klaas
On 11-Jun-07, at 7:22 PM, Otis Gospodnetic wrote:

> I'm trying to use 'fq' param (see http://wiki.apache.org/solr/ 
> CommonQueryParameters ) with the standard request handler, using a  
> field that is defined as an integer (values 1 or 0), is indexed,  
> and is stored.  For some reason, these two return no hits, even  
> though I do have MyIntField with values 0 and 1 in the index:
>
>   http://localhost:8080/solr/select?q=birds&fq=MyIntField:0
>   http://localhost:8080/solr/select?q=birds&fq=MyIntField:1
>
>
> So I tried these, just to see if that makes any difference:
>   http://localhost:8080/solr/select?q=birds%20AND%20MyIntField:0
>   http://localhost:8080/solr/select?q=birds%20AND%20MyIntField:1
>   http://localhost:8080/solr/select?q=birds%20AND%20MyIntField:[*  
> TO *]
>
> No go - no hits.  Am I doing something obviously wrong?  I'm using  
> a Solr nightly from maybe a month ago.  I don't recall seeing any  
> bugs with the 'fq' param.

er... since the second batch of queries returned no hits, does that  
not indicate that the problem _isn't_ with fq?  You practically  
stripped it down to raw lucene territory here.

-MIke
Reply | Threaded
Open this post in threaded view
|

Re: fq with standard request handler

Chris Hostetter-3

: er... since the second batch of queries returned no hits, does that
: not indicate that the problem _isn't_ with fq?  You practically
: stripped it down to raw lucene territory here.

yeah, i'm with mike ... if q=birds AND MyIntField:0 returns no hits, it
doesn't suprise me that q=birds&fq=MyIntField:0 returns no hits.  what
does q=MyIntField:0 return?

have you tried debugQuery=true & explainOther=(some query that matches a
doc you expect to get from the main query)  ?


-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: fq with standard request handler

Yonik Seeley-2
In reply to this post by Otis Gospodnetic-2
On 6/11/07, Otis Gospodnetic <[hidden email]> wrote:

> Hi,
>
> I'm trying to use 'fq' param (see http://wiki.apache.org/solr/CommonQueryParameters ) with the standard request handler, using a field that is defined as an integer (values 1 or 0), is indexed, and is stored.  For some reason, these two return no hits, even though I do have MyIntField with values 0 and 1 in the index:
>
>   http://localhost:8080/solr/select?q=birds&fq=MyIntField:0
>   http://localhost:8080/solr/select?q=birds&fq=MyIntField:1
>
>
> So I tried these, just to see if that makes any difference:
>   http://localhost:8080/solr/select?q=birds%20AND%20MyIntField:0
>   http://localhost:8080/solr/select?q=birds%20AND%20MyIntField:1
>   http://localhost:8080/solr/select?q=birds%20AND%20MyIntField:[* TO *]
>
> No go - no hits.  Am I doing something obviously wrong?  I'm using a Solr nightly from maybe a month ago.  I don't recall seeing any bugs with the 'fq' param.

Further out in left field, perhaps a type mismatch with MyIntField?
Did you index the data with Solr as well?
Perhaps try faceting on MyIntField to see what the indexed values are...

-Yonik