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 :

Attachments (1)

382.patch (109.4 KB ) - added by fxp 14 years ago.
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.

Download all attachments as: .zip

Change History (2)

by fxp, 14 years ago

Attachment: 382.patch added

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.

comment:1 by fxp, 14 years ago

Resolution: fixed
Status: newclosed

r6854

See #388 for date range queries.

Note: See TracTickets for help on using tickets.