Searching number value that is stored as text returning no results?

Hi All

I have a few customised searches in my application that is web based.

All the Forms that i am searching on contain a field called SafeNumber which is a text field, All documents contain a SafeNumber. The SafeNumber field will always contain a numeric value but it is actually a text field

Now when i do a custom search using either of the following queries:

(FIELD SafeNumber CONTAINS 230)

(FIELD SafeNumber = 230)

i get 0 results even though there are documents with 230 as the SafeNumber value

Using the same search form and using the search query on another text field called SafeStation

(FIELD SafeStation CONTAINS 500)

this query works and i get results even when the field SafeStation only has the value of 500

The view i am searching in does contain documents with the safenumber field (view contains all database docs)

I have verified that the SafeNumber field holds a text value on every doc in the database

I have deleted the index, compacted and recreated the index.

My database is only 100 mb big

I am pulling my hair out here as i really cannot see why i cant get any results on a search looking for a perticular SafeNumber

Any assistance/insight would be greatly appreciated

Cheers

Mike

Subject: Searching number value that is stored as text returning no results???

Have you confirmed that SafeStation is a text field on all documents? By checking document properties.

Have you tried with quotes round the value?

(FIELD SafeNumber contains “230”)

Subject: RE: Searching number value that is stored as text returning no results???

Hi Simon

All SafeStation fields are confirmed as text also

The quotes dont make any difference to the searches i get the same results

Also did wildcard searches on the SafeStation and this returned results but not on the SafeNumber

Any more suggestions?

Cheers

Mike

Subject: RE: Searching number value that is stored as text returning no results???

Hi Mike

Is SafeNumber encrypted and the index does not include encrypted fields?

And how did you destroy the old full text index? Try to remove the databasename.ft directory instead of using the property box in Notes client.

Did you try to make a replica on another server with a new filename and try all again?

Cheers

Bodo

Subject: RE: Searching number value that is stored as text returning no results???

Hi Bodo

Safnumber is not encrypted (Safenumber is found on a general search just not on (Field Safenumber = 123)

I have 3 copies of the database on the server and all do the same thing. Have removed the ft. directory also No help there

Have not tried anothe rserver, but will now have to build one to try that option :slight_smile:

I am down to the last clump of hair on my head

thanks for your response and will advise the results

Mike

Subject: Searching number value that is stored as text returning no results???

By default numbers are excluded from Full text indexes.

See this technote:

http://www-1.ibm.com/support/docview.wss?rs=899&uid=swg21100793