⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Exact search question



judge

judge
  • profile picture
  • Member

Posted 23 March 2016 - 11:12 AM

Hi,

I have some questions about searching. It looks like the code is hard-wired to perform 'like' searches rather than exact matches. This gives some counter-intuitive results when the column being searched is a number where, in my opinion, people are more likely to want to be able to perform an exact match e.g. 'show me all accounts where the balance is 0'.

So I was wondering how I would start looking at implementing such a feature, possibly by allowing the user to enter a search term into the search box, such as '< 0' or '> 0 and < 100'?

Which brings me to another question. When I search on a column displaying floating point numbers it seems to be treating those columns like text. For example, a database column containing a decimal number might be formatted in the table like 0.0000. When I search on that column it still performs a 'like' search, so if I enter 0, it will return any row where that column contains a zero anywhere, e.g. 4.3210 will be returned as well as 0.0000. Where is this number-to-text conversion taking place such that a 'like' search will actually work?

So finally one more question. If I delve into the source code I see various different field types, but none of them relate to real numbers. In fact the only numeric type is Integer. So how are real numbers treated?

aflewel1

aflewel1
  • profile picture
  • Member

Posted 21 November 2019 - 22:03 PM

Judge, did you find an answer to this?  I had the same question too.