Lucene Numbering Search with LUKE

I have the number of Lucene numeric indexed fields:

60000
78500
105000

If I use LUKE to query for 78500 as follows:

price:78500

It returns the correct record, however, if I try to return all three records as a range, I do not get any results.

price:[60000 TO 105000]

I understand this is due to padding, since numbers are processed by Lucene strings, but I just want to know what I have to put in LUKE in order to return three records.

Thanks so much for any help.

+3
source share
4 answers

, , , , , . , . :

060000
078500
105000

Umbraco, , , , - , .

Umbraco

+3

NumericField, " XML- Parser" 3.5 :

https://code.google.com/p/luke/downloads/detail?name=lukeall-3.5.0.jar&can=2&q=

:

<BooleanQuery>
<Clause fieldName="colour" occurs="must">
    <TermQuery>rojo</TermQuery>
</Clause>
<Clause fieldName="price" occurs="must">
    <NumericRangeQuery type="int" lowerTerm="4000" upperTerm="5000" />
</Clause>
</BooleanQuery>
+11
  • , , ,
  • , , .
  • , , , price:[10500 TO 78500]

, ,

+1

Source: https://habr.com/ru/post/1789694/


All Articles