How can i use numbers for indexing and searching?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   nithya_vembu
Posted On:   Monday, July 17, 2006 04:43 AM

Hi All, i am working in lucene. I tried to index the numbers which declared as String type.During search i got irrelevant result. For example:I used the following numbers "20,30,40,50,200,201,301". In the rangeQuery() if i give the upper and lower term as Query query = null; Term t1 = new Term("ALL","20"); Term t2 = new Term("ALL","34"); query = new RangeQuery(t1, t2, true); During search i am getting the following result:(20,30,200,201,301). Because 20->200,201 starts with 2.I found it. I dont know whether it is correct. But is it possible to index the integer number.    More>>

Hi All,

i am working in lucene. I tried to index the numbers which declared as String type.During search i got irrelevant result.


For example:I used the following numbers "20,30,40,50,200,201,301". In the rangeQuery() if i give
the upper and lower term as


Query query = null;

Term t1 = new Term("ALL","20");

Term t2 = new Term("ALL","34");

query = new RangeQuery(t1, t2, true);


During search i am getting the following result:(20,30,200,201,301).

Because 20->200,201 starts with 2.I found it.

I dont know whether it is correct. But is it possible to index the integer number.
And also i want to search the number for greater than and less than condition. Plz give me the solution if anyone know..


Regards,

V.Nithya.

   <<Less
About | Sitemap | Contact