Solved

Search for a number rather than text?

Posted on 2003-12-09
18
267 Views
Last Modified: 2013-12-18
I have a small database containing fixed assets. Each asset has a number E.G. 123. When the database was written the number was stored in a text field rather than a number field. I recently changed this to a number field as it was number '1000' was showing at the the bottom of the view, with '999' at the top.

So I changed the field in the form to a number field, then edited and saved each doc to update. The problem is I can no longer use the content of this field/view to search for say asset number '503' it just comes back with no results.

I deleted and created a new text index, but no change. Will I have to revert to storing this asset number as text in order for the search to work? If so, how would I create a view that sorts 999 as a lower value than 1000?

Thanks.
0
Comment
Question by:scribla
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 4
  • +1
18 Comments
 
LVL 13

Expert Comment

by:CRAK
ID: 9903460
You could convert the old text values to numbers using an agent:

Field assetnumber := @TextToNumber(@Text(assetnumber));
@Success

note:
I first convert ALL values to text, then to number to avoid errors on your new (number) documents:
@TextToNumber(<number>) will raise an error like "text expected".
0
 
LVL 2

Author Comment

by:scribla
ID: 9903468
CRAK, I don't have any old text values, I have taken care of the conversion, the asset numbers in the field in question are stored as numbers.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9903567
Sorry, now I see what you mean.
Yes... that's unfortunately how the searchbar works.

You could either reconvert the numbers to text,
Add an additional field (computed) to store the same number as text
Use the options under "more" to look specifically for documents where field (assetnumber) is equal to 503.

I never realized that it didn't find numbers!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 31

Expert Comment

by:qwaletee
ID: 9904282
Did you delete and recreate the ful text index AFTER converting all numbers to text?

Did you make sure all remnants of the ld full text index were removed before recreating the index?

Did you try compacting the database between the destruction and recreation of the full text index?
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9904328
I tried it all qwaletee.... it doesn't find numbers!
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9905070
R5 full text index supposedly index text only ! Not sure why they removed support for numbers which was available in R4. Not sure of R6 though ? Kind of limitation. Let me see if I can find any more information.


~Hemanth
0
 
LVL 2

Author Comment

by:scribla
ID: 9905166
I'm guessing finding numbers in the FTI is out of the question.
So, if I convert back to text, what's the best practice to store as text, but be able to sort 'as' numbers in my view?

What I mean by that is a number field in a view would sort 1000,999,998,997,etc. but a text field in a view would result in 3,2,1,1000.

0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 300 total points
ID: 9905548
COnvert the text value to number in the column formula

@TextToNumber(TEXTFIELDNAME)
0
 
LVL 13

Assisted Solution

by:CRAK
CRAK earned 200 total points
ID: 9907717
Or try the option of a 2nd, computed field:
You'll always find the right doc's in the searchbar, and youll always be able to use the seach by field (under "more") to look for numbers over or under a certain value. You can't do that with text!

Show the numeric field to users, compute the text. Use either one in columns etc.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9909403
HemanthaKumar,
> R5 full text index supposedly index text only ! Not sure why they removed
> support for numbers which was available in R4. Not sure of R6 though ? Kind
> of limitation. Let me see if I can find any more information.

What are you talking about?  I just tried it, no problem.  Of course, the client I just tried it with was an early version of 5, and I do know they tweaked the engine a bit during the 5 release cycle (I think 5.0.5).
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9909423
Just tried it on a 6 server using a 5 client, no prob.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9910611
5.0.10 here..... sux!
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9912765
I am talking about what exactly the problem is...

Crak, same here..
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9912909
??? Same there, but you don't know what the problem is?
Create a number field. Create a new doc, fill out the number field with a known value, create/update the FT index, search for the number and find out what the question is about and why 5.0.10 sux.
;-))
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9916992
Have you tried searching by field name for the new field?

And why would anyone use .10 anyway.  .12 has been out for six months already.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9918842
Sure I have.... that works ok. But like I said, I never knew RT search didn't pick up numbers if only entered in the searchbar. And honestly, thats the only dissapointment that I can think of.
Use of 5.0.10 is determined by the company. It's probably too much effort to roll out updates. Administratoes have tried updates, especially for admin client (remote console) related bugs. Temporarily up to .13 I believe.
I'd rather see 6.x installed so I'd finally get to play with those features!
0
 
LVL 2

Author Comment

by:scribla
ID: 9919045
Running 5.0.10 client and server here, we should roll out R6 early next year.

I have converted my numbers back to text again, search works as expected, but I still have a problem with my view. I tried @TextToNumber(AssetNo) against my view coloumn, but with strange results. My view coloumn is now populated with values like 1E+02, 10E+02. However, it is at least sorting correctly now!
0
 
LVL 2

Author Comment

by:scribla
ID: 9919255
Duh! ignore my last comment. All sorted, works a treat.  Thank you all for your input and thought on this.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question