Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:26:51+00:00 2026-06-03T02:26:51+00:00

A bigger question is will solr even be able to support this? I know

  • 0

A bigger question is will solr even be able to support this? I know I have seen lucene be able to do this and solr is built on lucene.

I have seen an example somewhere using google but can’t seem to find it again, and the example was not complete in that I don’t think it had the query portion on how I write my query statement for lucene. I remember seeing a NumericField and there is this NumericComparator.

Basically, I am trying a noSQL orm solution that offers indexing(on github) (though the client decides how many indexes per table and the partitioning methodology but you add entites to the index and remove them yourself and can use namedQueries though you have to get the index by name first before the query since one table may have millions of indexes). The two main things I want to achieve are that it all works with an in-memory nosql fake db and an in-memory index(lucene’s RAMDirectory) AND then I want to switch those to plugging in cassandra and SOLR.

I basically need to

  1. figure out how to store integers, floats, etc.
  2. figure out how to write a lucene query when the targets are strings, floats, ints, etc.

Right now, if you need more details the main Query code of the project is found at
https://github.com/deanhiller/nosqlORM/blob/master/input/javasrc/com/alvazan/orm/layer3/spi/index/inmemory/MemoryIndexWriter.java

and on line 172 you can see I am adding a new Field every time but unfortunately some of these may be ints.

BIG QUESTION: Can SOLR even support int vs. string? (IF not, I will have to go with the hack of padding 0’s on the front of ints, longs etc. so all ints are the same length).

IF SOLR can support it, then in lucene what is the best way or is there a good example for this?

The main index interface retrieved from NoSqlEntityManager.getIndex(Class clazz, String indexPartitionName) is (though not sure it matters)..
https://github.com/deanhiller/nosqlORM/blob/master/input/javasrc/com/alvazan/orm/api/Index.java

thanks,
Dean

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:26:52+00:00Added an answer on June 3, 2026 at 2:26 am

    From the example SOLR schema.xml file:

    <!--
          Default numeric field types. For faster range queries, consider the tint/tfloat/tlong/tdouble types.
        -->
    <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
    <fieldType name="float" class="solr.TrieFloatField" precisionStep="0" positionIncrementGap="0"/>
    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
    <fieldType name="double" class="solr.TrieDoubleField" precisionStep="0" positionIncrementGap="0"/>
    <!--
         Numeric field types that index each value at various levels of precision
         to accelerate range queries when the number of values between the range
         endpoints is large. See the javadoc for NumericRangeQuery for internal
         implementation details.
    
         Smaller precisionStep values (specified in bits) will lead to more tokens
         indexed per value, slightly larger index size, and faster range queries.
         A precisionStep of 0 disables indexing at different precision levels.
        -->
    <fieldType name="tint" class="solr.TrieIntField" precisionStep="8" positionIncrementGap="0"/>
    <fieldType name="tfloat" class="solr.TrieFloatField" precisionStep="8" positionIncrementGap="0"/>
    <fieldType name="tlong" class="solr.TrieLongField" precisionStep="8" positionIncrementGap="0"/>
    <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>
    

    So if you index a field as one of those fieldtypes above, then query it via its fieldname (e.g. myIntField:1234) it will do the “right thing” and you can also do range searches against it (myIntField:[1200 TO 1300]). Same goes for floats, etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know? And a bigger question is what happens when you encounter this
Here is another question I have about being able to calculate this scenario in
I'm working on a bigger project atm, but I made this simple example to
I'm working on a bigger problem, but have narrowed it down to this, in
Maybe this is not the right stack to ask this question, let me know
I'm not sure if this is the right place for this question, and will
I know this is not a really programmic question, but which one should I
This is a more theoretical question, not a specific scenario: Let's assume, we have
So this will no doubt come as a stupid question from an ignorant person,
I have an example: http://jsfiddle.net/kamaci/uVQZc/3/ When I animate bigger blue div, I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.