ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL / Types of HFSQL variables
  • Properties specific to the description of full-text indexes
  • How to describe data files programmatically?
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
A FullTextIndex description variable is used to describe one or more full-text indexes programmatically. The characteristics of these indexes can be defined using different WLanguage properties
To add the description of this index into the description of a data file, use HDescribeFullTextIndex. The "FullTextIndex Description" variable is reinitialized and it can be used to describe another full-text index through programming.
Example
AFile is File Description
AnItem is Item Description
MyFullTextIndex is IndexFullText Description
CUSTOMER is Data Source

// Describe the "CUSTOMER" file
AFile.Name = "CUSTOMER"
AFile.Type = hFileNormal
AFile.FicEncryption = hEncryptionStandard

// Description of the "LASTNAME" item
AnItem.Name = "LASTNAME"
AnItem.Type = hItemText
AnItem.Size = 40
AnItem.KeyType = hDuplicatesKey
HDescribeItem(AFile, AnItem)

// Describe the "FIRSTNAME" item
AnItem.Name = "FIRSTNAME"
AnItem.Type = hItemText
AnItem.Size = 40
HDescribeItem(AFile, AnItem)

// Describe the full-text index
MyFullTextIndex.MinimumLength = 4
MyFullTextIndex.Name = "MyFullTextIndex"
MyFullTextIndex.Items = "LASTNAME+FIRSTNAME"
MyFullTextIndex.AccentSensitive = True
MyFullTextIndex.CaseSensitive = False
HDescribeFullTextIndex(AFile, MyFullTextIndex)

// Validate the file description
HDescribeFile(AFile)
// Create the Customer file (recognized because declared as data source)
HCreate(CUSTOMER)
// Create a record
CUSTOMER.LASTNAME = "Doe"
CUSTOMER.FIRSTNAME = "Andrew"
HAdd(CUSTOMER)
// Create a record
CUSTOMER.LASTNAME = "Doe"
CUSTOMER.FIRSTNAME = "Vince"
HAdd(CUSTOMER)
Syntax

Declaring one or more FullTextIndex descriptions Hide the details

<Variable name> is FullTextIndex description
<Variable name 1>, <Variable name 2> are FullTextIndex descriptions
<Variable name>:
Name of the "hFullTextIndex Description" variable to declare.
Remark: The a and an keywords are optional: they provide better readability.

Describing a "FullTextIndex Description" variable Hide the details

To describe a "FullTextIndex Description" variable:
Use the WLanguage properties specific to the descriptions of full-text indexes. For more details, see remarks.

To validate the description of a "FullTextIndex Description" variable:
Use the HDescribeFullTextIndex function.
Remarks

Properties specific to the description of full-text indexes

The table below presents the properties specific to the description of full-text indexes:
NameType usedEffect
AccentSensitiveBooleanUsed to define and find out whether the punctuation (comma, dot, ...) is taken into account in the searches performed on the item
CaseSensitiveBooleanUsed to define and find out whether the case (uppercase/lowercase characters) is taken into account in the searches performed on the item.
ItemsCharacter stringUsed to define and find out the different items included in the full-text index.
ManageHTMLBooleanConfigures the management mode of the HTML format in a full-text index.
ManageRTFBooleanConfigures the RTF management mode in a full-text index.
MinimumLengthIntegerUsed to define and find out the minimum length of the words to index.
NameCharacter stringMandatory property used to define and find out the name of the full-text index item.
OptionInteger constantUsed to define specific options on the full-text index item.
This property can correspond to:
  • the hftPunctuationUnicode constant to take into account the specific features of the Unicode punctuation.
  • the hftPunctuationSimple constant not to take into account the specific features of the Unicode punctuation.
StemmingInteger constantMandatory property used to define the language in which the stemming must be performed.
StopWordCharacter stringUsed to define the empty words not to index.
SynonymCharacter stringUsed to define the synonyms taken into account during the indexing.

How to describe data files programmatically?

To describe data files programmatically:
  1. Declare the variables of type "File Description", "Item Description", "FullTextIndex Description" and "Link description" (if necessary).
  2. For each data file:
  3. If necessary, describe the characteristics of the links using HFSQL properties.
  4. If necessary, validate the description of each link (HDescribeLink).
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/06/2024

Send a report | Local help