lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: search documents that have a specific field populated
Date Fri, 15 Jul 2016 16:42:02 GMT
First of all I get an error message on startup with a field definition like:
default=EMPTY.

So I'm assuming you are puttint in quotes
default="EMPTY"

The query
q=field:[* TO *] should be fine, as is John's
query
fq:field:[* TO *]

So something's wonky here. I'd start by
deleting the entire index on the theory that
you're in a state you don't remember (i.e.
perhaps during some of your experiments
you now have docs with "EMPTY" in the field,
some blank and whatever else).

Second, don't provide any default for the field.

At that point q=field:[* TO *] should work. If it doesn't,
please post again with
1> a sample doc
2> the field definition exactly as in your schema
file (please copy/paste).
3> the results of adding &debug=query to the URL.

Best,
Erick

On Fri, Jul 15, 2016 at 8:16 AM, John Blythe <john@curvolabs.com> wrote:
> we use something in between: fq=fieldName[* TO *]
>
> --
> *John Blythe*
> Product Manager & Lead Developer
>
> 251.605.3071 | john@curvolabs.com
> www.curvolabs.com
>
> 58 Adams Ave
> Evansville, IN 47713
>
> On Fri, Jul 15, 2016 at 10:17 AM, Valentina Cavazza <valentina@step-net.it>
> wrote:
>
>> Hi,
>> I need to search documents that have a specific field populated, so I want
>> to display all the documents that have the field not empty.
>> This field in schema is set multivalued=true, indexed=true, stored=true,
>> default=EMPTY.
>> This field type is solr.TextField class, use StandardTokenizerFactory
>> tokenizer, ICUFoldingFilterFactory filter, LowerCaseFilterFactory filter
>> and GreekStemFilterFactory filter in index and query analizer.
>> I already tried queries like this:
>> q=field:*
>> q=+field:*
>> q=+field:[* TO *]
>> q=+field:['' TO *]
>> q=+field:["" TO *]
>> q=+field:[' ' TO *]
>> q=+field:' '
>> q=-field:EMPTY
>>
>> but nothing found.
>> Someone know how to do that?
>> Thanks
>>
>> Valentina
>>

Mime
View raw message