lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <>
Subject Re: Issue in using numeric values
Date Wed, 01 Jul 2009 12:10:22 GMT
On Wed, Jul 1, 2009 at 5:15 PM, con <> wrote:

> Hi
> I am setting up a solr search index which makes use of dataimporthandler.
> Here i have a column, called rank. it will contain values from 1 to 10.
> But this is of type varchar in oracle db and TextField in corresponding
> schema.

I think it is best if you store the value as an integer or sint in Solr. Use
the NumberFormatTransformer in DIH to convert between the varchar and
integer types.

> The issue here is when i do a:
> sort=rank asc in the query, i am not getting the actual rank based sorted
> results
> also, rank:5 , is giving 0 results(all results with rank 5 is expected).

I think the text type may be removing all numbers. You can see how values
which are put in a text type field are analyzed through analysis.jsp on the
solr dashboard.

Shalin Shekhar Mangar.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message