Okay, <field name="SERIALNO" type="int" ... /> is correct, but it belongs in your Solr schema file, schema.xml, NOT your Solr XML data file. In other words, the schema.xml file declares the type for each field, NOT the Solr XML field elements.

-- Jack Krupansky

-----Original Message----- From: Leena Jawale
Sent: Wednesday, October 31, 2012 12:06 AM
To: 'solr-user@lucene.apache.org'
Cc: Sawant, Amit2
Subject: Query regarding solr search


Hi,
My XML file is

<add>
<doc>
<field name="SERIALNO" type="int">1001 </field>
<field name="MODELNAME" type="text">IBM 1001 </field>
<field name="ASSETTAG" type="text">INFPW03772 </field>
<field name="date" class="solr.DateField">22/4/2010 </field>
<field name="PRICE1" type="int">1000</field>
</doc>
<doc>
<field name="SERIALNO" type="int">1002 </field>
<field name="MODELNAME" type="text">DELL 1002 </field>
<field name="ASSETTAG" type="text">INFPW03734 </field>
<field name="date" class="solr.DateField">09/7/2010 </field>
<field name="PRICE1"  type="int">5000</field>
</doc>
</add>

But still the SerialNo and price1 working according to type text.

Thanks,
Leena Jawale


From: Leena Jawale
Sent: Tuesday, October 30, 2012 4:58 PM
To: 'solr-user@lucene.apache.org'
Cc: 'Sawant, Amit2 '
Subject: RE: Query regarding solr search

Hi,

I understand that in the solr search considering the field type as text_en and not as int for the fields. So how do I convert the field type of a particular field in solr XML as int so that I can operate that
field for range queries in solr??

Thanks,
Leena Jawale

From: Leena Jawale
Sent: Tuesday, October 30, 2012 12:18 PM
To: 'solr-user@lucene.apache.org'
Cc: 'Sawant, Amit2 '
Subject: Query regarding solr search

Hi,

I have created Solr XML data source. And on that I am working on less than operator. I tried q=SerialNo:[ * TO 500 ].But It is showing records having SerialNo=1000. Could you help me this.?


Thanks,
Leena Jawale

________________________________
The contents of this e-mail and any attachment(s) may contain confidential or privileged information for the intended recipient(s). Unintended recipients are prohibited from taking action on the basis of information in this e-mail and using or disseminating the information, and must notify the sender and delete it from their system. L&T Infotech will not accept responsibility or liability for the accuracy or completeness of, or the presence of any virus or disabling code in this e-mail"

Reply via email to