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 Mysurf Mail <st...@gmail.com> on 2013/08/05 10:35:35 UTC

solr - using fq parameter does not retrieve an answer

When I query using

http://localhost:8983/solr/vault/select?q=*:*

I get reuslts including the following

<doc>
  ...
  ...
  <int name="VersionNumber">7</int>
  ...
</doc>

Now I try to get only that row so I add to my query fq=VersionNumber:7

http://localhost:8983/solr/vault/select?q=*:*&fq=VersionNumber:7

And I get nothing.
Any idea?

Re: solr - using fq parameter does not retrieve an answer

Posted by Mysurf Mail <st...@gmail.com>.
Thanks.


On Mon, Aug 5, 2013 at 4:57 PM, Shawn Heisey <so...@elyograg.org> wrote:

> On 8/5/2013 2:35 AM, Mysurf Mail wrote:
> > When I query using
> >
> > http://localhost:8983/solr/vault/select?q=*:*
> >
> > I get reuslts including the following
> >
> > <doc>
> >   ...
> >   ...
> >   <int name="VersionNumber">7</int>
> >   ...
> > </doc>
> >
> > Now I try to get only that row so I add to my query fq=VersionNumber:7
> >
> > http://localhost:8983/solr/vault/select?q=*:*&fq=VersionNumber:7
> >
> > And I get nothing.
> > Any idea?
>
> Is the VersionNumber field indexed?  If it's not, you won't be able to
> search on it.
>
> If you change your schema so that the field has 'indexed="true", you'll
> have to reindex.
>
> http://wiki.apache.org/solr/HowToReindex
>
> When you are retrieving a single document, it's better to use the q
> parameter rather than the fq parameter.  Querying a single document will
> pollute the cache.  It's a lot better to pollute the queryResultCache
> than the filterCache.  The former is generally much larger than the
> latter and better able to deal with pollution.
>
> Thanks,
> Shawn
>
>

Re: solr - using fq parameter does not retrieve an answer

Posted by Shawn Heisey <so...@elyograg.org>.
On 8/5/2013 2:35 AM, Mysurf Mail wrote:
> When I query using
> 
> http://localhost:8983/solr/vault/select?q=*:*
> 
> I get reuslts including the following
> 
> <doc>
>   ...
>   ...
>   <int name="VersionNumber">7</int>
>   ...
> </doc>
> 
> Now I try to get only that row so I add to my query fq=VersionNumber:7
> 
> http://localhost:8983/solr/vault/select?q=*:*&fq=VersionNumber:7
> 
> And I get nothing.
> Any idea?

Is the VersionNumber field indexed?  If it's not, you won't be able to
search on it.

If you change your schema so that the field has 'indexed="true", you'll
have to reindex.

http://wiki.apache.org/solr/HowToReindex

When you are retrieving a single document, it's better to use the q
parameter rather than the fq parameter.  Querying a single document will
pollute the cache.  It's a lot better to pollute the queryResultCache
than the filterCache.  The former is generally much larger than the
latter and better able to deal with pollution.

Thanks,
Shawn


Re: solr - using fq parameter does not retrieve an answer

Posted by Jack Krupansky <ja...@basetechnology.com>.
Is VersionNumber an "indexed" field, or just "stored"?

-- Jack Krupansky

-----Original Message----- 
From: Mysurf Mail 
Sent: Monday, August 05, 2013 4:35 AM 
To: solr-user@lucene.apache.org 
Subject: solr - using fq parameter does not retrieve an answer 

When I query using

http://localhost:8983/solr/vault/select?q=*:*

I get reuslts including the following

<doc>
  ...
  ...
  <int name="VersionNumber">7</int>
  ...
</doc>

Now I try to get only that row so I add to my query fq=VersionNumber:7

http://localhost:8983/solr/vault/select?q=*:*&fq=VersionNumber:7

And I get nothing.
Any idea?