Ticket #382 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

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

382.patch Download (109.4 KB) - added by fxp 3 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.

Change History

Changed 3 years ago by fxp

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.

Changed 2 years ago by fxp

  • status changed from new to closed
  • resolution set to fixed

r6854

See #388 for date range queries.

Note: See TracTickets for help on using tickets.