How to write a solr query for retrieving all records with numeric field value less then specified?

I don't think the query parser supports < operator. You have to define a RangeQuery explicitly. You can then attach a name query to that using a BooleanQuery.

Update: Apparently, I was wrong. In fact, Solr's query parser is smarter than Lucene's. Here is your answer: https://lucene.apache.org/solr/guide/8_0/the-standard-query-parser.html#differences-between-lucene-s-classic-query-parser-and-solr-s-standard-query-parser

field:[* TO 100] finds all field values less than or equal to 100


also note that performancewise you should use a filter query for this:

&q=name:ipod&fq=price:[* TO 100]

From my knowledge, I do not believe that Solr/Lucene supports greater/less than. It can be done programmatically for things like integers and dates (and in your case, money values, since there are only two decimal places to worry about).

For example, natively, Lucene and Solr query parsers support less than or equal to (<=):

?q=name:ipod AND price:[* to 99.99]

This would give you the less than 100 dollars that you're looking for, provided the data doesn't involve fractions of a cent.

For things like dates and integers, or other things that have notably finite differences, you can decrement (or in the case of greater than, increment) the value you're going for.

EDIT: Check the documentation for version 6.5 of Solr. It DOES contain exclusive range support. Page 272 of the reference guide explains.

http://mirror.cc.columbia.edu/pub/software/apache/lucene/solr/ref-guide/apache-solr-ref-guide-6.5.pdf

Essentially, use curly braces to denote less than.

?q=name:ipod AND price:{* TO 100}