Opened 14 years ago
Closed 14 years ago
#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 (1)
Change History (2)
by , 14 years ago
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Add support for numeric field (configuration for denominator, west, east, south, north parameters). Removed all 360+1 for spatial search using Lucene. Removed token attribute from index-fields.xsl in order to avoid a different tokenized fields configuration.