lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Finding an empty field
Date Fri, 14 Mar 2008 18:37:52 GMT

: 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


Mime
View raw message