dateorigin_sort:""  gives a syntax error.  I'm using Solr 1.2. Should
this work in Solr 1.3? Is it legal in a newer Lucene parser?



        message Query parsing error: Cannot parse 'dateorigin_sort:""':
Lexical error at line 1, column 19. Encountered: <EOF> after : "\"\""

        description The request sent by the client was syntactically
incorrect (Query parsing error: Cannot parse 'dateorigin_sort:""':
Lexical error at line 1, column 19.     Encountered: <EOF> after :
"\"\""). 

Thanks,

Lance

-----Original Message-----
From: Chris Hostetter [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 14, 2008 11:38 AM
To: solr-user@lucene.apache.org
Subject: Re: Finding an empty field


: Somehow the index has acquired one record out of millions in which an
: integer value has been populated by an empty string. I would like to
isolate
: this record and remove it. This field exists solely to make sorting
faster,
: and since it has an empty record, sorting blows up. 
:  
: Is it possible to find this record? Is there any way to differentiate
: between this record and all of the other records which have real
numbers
: populated?  

have you tried searching for...

             dateorigin_sort:""
?

: This query will isolate records which do not have the field populated.
(It
: works on all field types.)
:     -dateorigin_sort:[* TO *]
: But, since this record is an integer (not an sint) no other range
query
: works.

well, technically range queries "work" they just don't "work" on numeric
ranges ... they'd be lexigraphical ranges on the string value, so...

        dateorigin_sort:[* TO " "] 

...could probably help you find anything that is lexigraphically lower
then a string representation of an integer (assuming dateorigin_sort:"" 
doesn't work)


disclaimer: i haven't actaully tested either of these on an index with a

bogus integer like you describe ... but i'm pretty sure they should work

given what i'm remembering about the code)


-Hoss

Reply via email to