Data File Creation

Data files are the basis of all FlexSearch operations, they can be created online or uploaded. A data base is made up of fields and indexes.   The indexes are created and maintained by FlexSearch.

There are many ways to create your own database.  In our example, we used a spreadsheet program to create a simple phone book.  You could also create your database using a database program, or a text editor, or a word processing program.   

If you are not comfortable with creating your database in one of the above formats and then uploading it to FlexSearch, it is possible to create your data file online, which we will discuss later.

Before you create an application, you must think about how to organize your data. Organization of data consists of not only what data will reside in what files, but how thoes file will be related and indexed.

The indexes are what FlexSearch uses to search the data.  You can define three types of indexes, alphabetical (*), case insensative alphabetical (*i) and numeric(*#).   Each type will intrepret the data in a field differently, for instance, an alphabetic index will sort 'a' after 'Z', and will sort '10' before '9'.  A case insensative alphabetic index will still sort '9' after '10', but will sort 'a' before 'Z', finally a numeric index will correctly sort '10' after '9', but will generate an error if the field contains 'a'.

Relating data files allows information that would have to be repeated many times in a single data file to be entered once in a related file and referenced many times in the first file.  For instance, a data fle that contains the address information of a customer can be related to a data file that lists the orders that the customer has placed.   The relationship takes place because the customer file has a unique id, which is also in a field in the order file.  When the customer information is need on an order query, a secondary query is performed on the customer file using the unique id.  See searches for more information

For Example, we can create a spreadsheet where the top row contains the field names, which are "FirstName*", "LastName*", "Address", "City", "State", "Zip*#", "Home" and "Work".    The fields FirstName, LastName and Zip have been marked as indexes.  That means that they are fields that can be used in a search.  The other fields can be used on templates but not on a search. All of the remaining rows in the spreadsheet contain the data.

Once the data has bee created the file must be prepared to send to FlexSearch.   FlexSearch reads delimited ASCII files.

Basically, the text file should have one data record per line with the fields separated by a delimiter. A common form of delimiting in the PC world is "quote comma delimited" or "comma delimited" FlexSearch can read these files. In UNIX and MAC worlds it is common to use an odd character delimiter, FlexSearch can also take these files. If possible, have the first record in the file be the field names.  If not, you will have to tell FlexSearch how many fields are in your file, FlexSearch will then give you initial field labels "field_#" and you can edit them to have the correct names for your application.  (See the sample Upload Data File form below.)

When your file is ready you use your browser to login to FlexSearch, go to the "Data File Maintenance Menu" then select Upload Data File.  You will now be looking at this screen.

Upload Data File

Local Data File:
FlexSearch Data File:
File Type: File Contains Field Labels
Field does not contain Field Labels
Number of Fields (unnecessary if file has field names)
Delimiter Type Tab Delimited
Other Delimiter
Other Delimiter: (unnecessary if file has tab delimiters)


Local data file is the file on your computer, you can type in the specification, or use the browse button to locate the file.

FlexSearch data file is the name to give the file on the web server. Note that if you give the name of an existing file the old one will be overwritten and replaced by the new one.  Additionally, if you specify a name that does not end in ".dat" this will be appended to the file name you specify.  If you specify no name at all, the name of your local file will be used.

File Type refers tells FlexSearch whether it needs to create field labels. When you need FlexSearch to create field labels, Number of Fields tells it how many. 

Delimiter type tells FlexSearch how to distinguish the field in the rows. Other Delimiter allows you to use delimiter types like "<*>" or ":" , simply specify what delimiter your file uses.

When you submit this form, your web browser will attach the local file to the form data and FlexSearch will store the file on the web server, convert it to FlexSearch’s internal format and build the indexes.  At the top of the Database Menu, you will notice that it says Data File Uploaded and your your filename is located in alphabetical order on the Database Menu.

Top