0

I am working with a bunch of documents in RavenDB that have an Age field that has to be an int but unfortunately they have been stored as string. I want to write a query to get all the docs with ages more than 20 here's what I do :

Age : [20 TO *]

But I am getting docs with ages of 3 to 9 too.(strings are compared from left hand side)

The question is how can I tell Lucene to treat age as int ?

(This system is somehow a legacy system I can't change the Age type in documents)

Beatles1692
  • 5,214
  • 34
  • 65

1 Answers1

0

You can use the following query:

Age_Range: [Ix20 TO *]
Ayende Rahien
  • 22,925
  • 1
  • 36
  • 41