Right, I figured that that's how it should have sorted... which is why
I did a range from 0 to 2000000

That should have worked for my example, but it removed things over
2000000, which using lexical sorting seems to still be invalid.

What's left are things like:  998914
Now, obviously that is expected, as it starts with a number over 2....
but why would things like 2165979 be deleted when that is lexically
after 2000000?

Unless... oh man, I hope I didn't put an extra zero in there by accident  !!
** checking .bash_history...

Oh crap... I ran it between 0 and 7 at some point.... sigh.
Thanks for the help!

-Reece



On Thu, Jul 30, 2009 at 10:08 AM, Erik
Hatcher<e...@ehatchersolutions.com> wrote:
>
> On Jul 30, 2009, at 9:44 AM, Reece wrote:
>
>> Hello everyone :)
>>
>> I was trying to purge out older things.. in this case of a certain
>> type of document that had an ID lower than 2000000.  So I posted this:
>>
>> <delete><query>id:[0 TO 2000000] AND type:I</query></delete>
>>
>> Now, I have only 49 type "I" items total in my index (shown by
>> /solr/select?q=type:I), when there should be numbers still up to about
>> 2165000 which is far far more than 49....  I'm curious why this would
>> be, as I'm trying to build it automatic purging of older things, but
>> this obviously didn't work the way I thought.
>>
>> I'm on version 1.1, and my schema information for the fields is below:
>>
>>  <field name="id" type="string" indexed="true" stored="true"
>> required="true" />
>
> Use one of the sortable numeric types for your id field if you need to
> perform range queries on them.  A string is sorted lexicographically: 1, 10,
> 11, 2, 3, 4, 5... and thus a range query won't work the way you might
> expect.
>
>        Erik
>
>

Reply via email to