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 Jonathan Vanasco <jv...@2xlp.com> on 2009/08/17 01:34:13 UTC

how do i - include the items without a facet

My result set for a query has 451 records
293 of them do not have a value set on 'facet.location_name'

how can i specify searching for these items?

i've tried:

	fq=facet.location_name:""

and based on http://wiki.apache.org/solr/SimpleFacetParameters#head-b618fc041ffc0c26ea45bdf086895e5b87061bd4

	fq=-facet.location_name:[* TO *]
	fq=facet.location_name:[* TO *]

but none seem to work

Re: how do i - include the items without a facet

Posted by Chris Hostetter <ho...@fucit.org>.
: "location_name" is a text field , copyto puts it in "facet.location_name"
: 
: i'm thinking this could be because the field was not entered as NULL but an
: empty string ?

assuming "facet.location_name" is a StrField then that would certainly be 
your problem -- because the empty string is a legitimate string value.

i would suggest properly indexing without the empty string value, but i 
suppose fq=facet.location_name:"" would probably work as well (untested)



-Hoss


Re: how do i - include the items without a facet

Posted by Jonathan Vanasco <jv...@2xlp.com>.
On Aug 16, 2009, at 9:59 PM, Avlesh Singh wrote:

>>
>> how can i specify searching for these items?
>>
> fq=-location_name:[* TO *]
> Your field name is "location_name" and not "facet.location_name".

its both.  and that didn't work on either.

"location_name" is a text field , copyto puts it in  
"facet.location_name"

i'm thinking this could be because the field was not entered as NULL  
but an empty string ?


Re: how do i - include the items without a facet

Posted by Avlesh Singh <av...@gmail.com>.
>
> how can i specify searching for these items?
>
fq=-location_name:[* TO *]
Your field name is "location_name" and not "facet.location_name".

Cheers
Avlesh

On Mon, Aug 17, 2009 at 5:04 AM, Jonathan Vanasco <jv...@2xlp.com> wrote:

> My result set for a query has 451 records
> 293 of them do not have a value set on 'facet.location_name'
>
> how can i specify searching for these items?
>
> i've tried:
>
>        fq=facet.location_name:""
>
> and based on
> http://wiki.apache.org/solr/SimpleFacetParameters#head-b618fc041ffc0c26ea45bdf086895e5b87061bd4
>
>        fq=-facet.location_name:[* TO *]
>        fq=facet.location_name:[* TO *]
>
> but none seem to work
>