faceted query result

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

faceted query result

James liu-2
for example.

i wanna show keyword: a and facet sid: 2

my url:
http://localhost:8080/solr1/select?q=a+sid:2&start=0&rows=10&fl=*&wt=json

but it show me count bigger than facetnum.

i read http://lucene.apache.org/java/docs/queryparsersyntax.html

and try server way , all not effect.


maybe someone know it.

--
regards
jl
Reply | Threaded
Open this post in threaded view
|

Re: faceted query result

Yonik Seeley-2
On 6/16/07, James liu <[hidden email]> wrote:
> i wanna show keyword: a and facet sid: 2
>
> my url:
> http://localhost:8080/solr1/select?q=a+sid:2&start=0&rows=10&fl=*&wt=json
>
> but it show me count bigger than facetnum.

'+' in a URL is like a space, so your query is the same as
default_field:a OR sid:2
  instead of
default_field:a AND sid:2

This should work:
q=a+%2Bsid:2
or preferably use a filter query
q=a&fq=sid:2

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

Re: faceted query result

James liu-2
thks.

2007/6/17, Yonik Seeley <[hidden email]>:

>
> On 6/16/07, James liu <[hidden email]> wrote:
> > i wanna show keyword: a and facet sid: 2
> >
> > my url:
> >
> http://localhost:8080/solr1/select?q=a+sid:2&start=0&rows=10&fl=*&wt=json
> >
> > but it show me count bigger than facetnum.
>
> '+' in a URL is like a space, so your query is the same as
> default_field:a OR sid:2
>   instead of
> default_field:a AND sid:2
>
> This should work:
> q=a+%2Bsid:2
> or preferably use a filter query
> q=a&fq=sid:2
>
> -Yonik
>



--
regards
jl