[ 
https://issues.apache.org/jira/browse/SOLR-13309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18062460#comment-18062460
 ] 

ASF subversion and git services commented on SOLR-13309:
--------------------------------------------------------

Commit 2501d331c8a14dfaa1c3e09e6445f6b26f26a00b in solr's branch 
refs/heads/branch_10x from Jason Gerlowski
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=2501d331c8a ]

SOLR-13309: Add IntRangeField for Lucenes IntRange (#4141)

This commit adds a new field type, IntRangeField, that can be used to
hold singular or multi-dimensional (up to 4) ranges of integers.

Field values are represented using brackets and the "TO" operator, with
commas used to delimit dimensions (when a particular field is defined as
having more than 1 dimension), e.g.

[-1 TO 5]
[1,2 TO 5,10]
[1 TO 1]

IntRangeField does not support docValues or uninversion, meaning it's
primarily only used for querying. The field can be stored and returned in
search-results. Searches on these range-fields rely on a new
QParserPlugin implementation, {!numericRange}, which supports
"intersects", "crosses", "within", and "contains" semantics via a
"criteria" local param. e.g.

  - {!numericRange field=price_range criteria=within}[1 TO 5]
     Matches docs whose 'price_range' field falls fully within [1 TO 5].
     A doc with [2 TO 3] would match; [3 TO 6] or [8 TO 10] would not.
  - {!numericRange field=price_range criteria=crosses}[1,10 TO 5,20]
     Matches docs whose 'price_range' field is partially but not fully
     contained within [1,10 TO 5,20]. A doc with [2,11 TO 6,21] would
     match, but [3,11 TO 5,19] would not.

This syntax is experimental and may change in the future.


> Add FieldTypes for Lucene IntRange, LongRange, FloatRange, DoubleRange
> ----------------------------------------------------------------------
>
>                 Key: SOLR-13309
>                 URL: https://issues.apache.org/jira/browse/SOLR-13309
>             Project: Solr
>          Issue Type: New Feature
>          Components: Schema and Analysis
>            Reporter: David Smiley
>            Assignee: Jason Gerlowski
>            Priority: Major
>              Labels: gsoc2019, mentor, pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> This issue is for adding Solr FieldType subclasses that expose the 
> functionality implemented by the Lucene classes: IntRange, LongRange, 
> FloatRange, DoubleRange.
> An attribute on the FieldType could specify the dimensionality 1-4.
> We'll need to come up with a syntax to specify the predicate: Intersects, 
> Contains, or Within.
> Credit to [~nknize] for implementing these cool classes at the Lucene level.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to