No cleaner ways that spring to mind. Although you might get some mileage out of normalizing _everything_ rather than indexing different forms. Perhaps all numbers are stored left-padded with zeros to 16 places to the left of the decimal point and right-padded 16 places to the right of the decimal point. Which incidentally allows you to do range queries and other numeric-type comparisons.
<rant> But I _really_ have to go back to one of my original questions: What's the use-case? You've outlined _how_ users would like to use regexes and wildcards over numeric data, but not _why_. You've accepted as a given that "contains" are necessary. Before investing any more time and effort, please, please, please figure out whether this is just something somebody threw in and is valueless or whether it's actually something that would provide value _to the end user_. This is where I really have to dig in my heels and have the product manager explain, in very concrete terms, the _value_ the user gets out of this. Don't get me wrong, there may be perfectly valid reasons. Just make sure they're well thought out before straining to provide functionality that implements a half-baked use-case that nobody then uses. Is this more valuable than not being able to do any statistics like sum, average, etc? When having this discussion, have the range queries in your back pocket and see if anything that the PM brings up can't be satisfied by numeric searches rather than string searches. Maybe even bring in a user and ask "is this useful?". I've just spent too much of my life implementing useless features to not question something like this ;) </rant> Best, Erick On Tue, May 19, 2015 at 7:19 AM, Todd Long <lon...@gmail.com> wrote: > I see what you're saying and that should do the trick. I could index 123 with > an index synonym 123.0. Then my regex query "/123/" should hit along with a > boolean query "123.0 OR 123.00*". Is there a cleaner approach to breaking > apart the boolean query in this case? Right now, outside of Solr, I'm just > looking for any extraneous zeros and wildcards to get the exact value (e.g. > 123.0) and OR'ing that with the original user input. > > Thank you for your help. > > - Todd > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Wildcard-Regex-Searching-with-Decimal-Fields-tp4206015p4206288.html > Sent from the Solr - User mailing list archive at Nabble.com.