Ticket #382 (closed enhancement: fixed)
Support numeric fields
| Reported by: | fxp | Owned by: | fxp |
|---|---|---|---|
| Priority: | minor | Milestone: | v2.7.0 |
| Component: | General | Version: | v2.6.1 |
| Keywords: | Cc: |
Description
Currently all Lucene field are index as text.
This can cause problem with numeric fields and range queries like scale denominator.
Eg.
<And>
<PropertyIsGreaterThanOrEqualTo>
<PropertyName>Denominator</PropertyName>
<Literal>5000</Literal>
</PropertyIsGreaterThanOrEqualTo>
<PropertyIsLessThanOrEqualTo>
<PropertyName>Denominator</PropertyName>
<Literal>50000</Literal>
</PropertyIsLessThanOrEqualTo>
</And>
Sort order is alphabetic so wrong results may occur.
Suggestion :
- Add configuration for numeric fields in config-lucene.xml
<numeric> <Field name="denominator" type="INT"/> </numeric>
- Update RangeQuery by NumericRangeQuery in LuceneQueryBuilder for numeric fields.
TODO : check if it could be better for dates
Info :
- RangeQuery/NumericRangeQuery comparison http://invertedindex.blogspot.com/2009/11/numeric-range-queries-comparison.html
- ML discussion http://osgeo-org.1803224.n2.nabble.com/Lucene-Index-numerique-au-lieu-d-alphabetique-td5708979.html
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

