Relational operators are not supported in text fields

Hi,

I have the following problem. I have two databases and I want to make a FT search in both of them for displaying some information. The search condition looks like this:

“FIELD dtCreareDoc >= 07/22/2004”

When the search is initiated the following error appear: “Relational operators are not supported in text fields”.

I have tried the following:

  • in both db there is a computed field called dtCreareDoc, type Date/Time and the computed formula is @Created.

  • in both db there are documents which contains the specified field.

Thank you,

Adi

Subject: Relational operators are not supported in text fields

Recently I had a similar problem. A query of the form [datefield]<1.1.1980 resulted in the error message “Relational operators are not supported in text field”.

When I tried to formulate the query using the “By Field” condition I realized that the field [datefield] only allowed the operators “contains” and “does not contain”.

This means that the full text index by mistake took the field [datefield] for a text field.

I then did the following:

  1. create a replica (without full text index)

  2. load fixup -F

  3. load compact -c

  4. delete the original database

  5. recreate the original db from the replica

  6. create a full text index

Et voilà: everything worked fine again. The query was executed correctly and the “By Field” condition offered all the relations for a date field.

P.S.: I’m not quite sure whether all steps are required, but I did not succeed just compacting the original database.

Subject: Relational operators are not supported in text fields

Hi guys,

Thank you for yours answers.

The problem is not solved. I must use FTSearch not DB Search.

All the syntax that you provide are for DB Search and this method is not usefull.

Thanks,

Adi

Subject: Relational operators are not supported in text fields

I have no idea how you would accomplish this in a FT search, but you can easily do this in a regular search.

dc = db.search(“dtCreareDoc >= @texttotime(“07/22/2004”)”

Subject: You can also use: dc = db.search(“dtCreareDoc >= [07/22/2004]”)

Subject: RE: Relational operators are not supported in text fields

Ok, so I didn’t type that properly -

db.search(“dtCreareDoc >= @texttotime(“07/22/2004”)”)