Doofinder needs to be “fed” with information on the products that should be displayed when searching. Understanding how the data feed works is very important to integrate Doofinder smoothly and make the most of it.
In this article, you’ll learn how to update and use:
- The Product Data Feed
- The Data Feed Information Fields
- The Special Attributes Feature
- The Faceted Search
The Product Data Feed
There are several ways to fed Doofinder with the products’ information. The most common are using a file or a URL. The file can be in .txt, .xml or CSV format. You can compress such a feed file in
URL or FILE
Go to Admin Panel >Indices. By clicking on ‘Add Source’ you can choose to enter the product information by setting the URL of the feed in the corresponding form (1) or by uploading the file (2) to the system.
By default, Doofinder updates the feed once a day, so if you use the URL option, you can keep a feed up to date automatically.
Google data feed
The Data Feed Information Fields
These are the fields of information that the feed must contain:
- A unique identifier (ID): could be a number, a string, or an alphanumeric string. It must be unique for every product.
- Link to the product’s page.
It is also great to include the following information:
- Image URL (preferably in .jpeg format)
- Category or type
A plain text file is the easiest to use, where each line represents a product. The first line must specify the field’s name, and each field must be separated by:
- | (pipe)
- ; (semicolon)
- , (comma)
title|link|description|id|price|image link|product type
Note: You can add as many attributes as needed for the search (colour, size, weigh, brand…). If the product has many field names to specify, it is better to use the Special Attributes function, as explained later in this article.
Best practice is to start with the most general category in the field names, and break them down to the finest specification.
A good example is shown here:
LG Flatron M2262D 22" Full HD LCD|http://www.example.com/electronics/tv/LGM2262D.html|Attractively styled and boasting stunning picture quality|TV_123456|159 USD|http://images.example.com/TV_123456.png|Consumer Electronics > TVs > Flat Panel TVs
Note: The image shows it as several lines, but it should be all on one line in the file.
You can configure various category trees. For instance, a sports shoe could belong to two categories like this:
- Sports > Clothes > Shoes; or
- Snickers > Jogging
Sports > Clothes > Shoes %% Snickers > Jogging
Special Attributes Feature
If the type of feed you provide to Doofinder is in CSV format, and you have a wide range of attributes for different products, you would need, in the first instance, a very long header line to specify all the attribute fields.
The names of these fields can be numerous and lead to a long and confusing list. To avoid this, we use the “special attributes” function.
Let’s say your e-commerce shop sells T-shirts, laptops and other electronic devices.
You would like to categorise T-shirts by size, colour, style and fabric, among other things. You would also like to categorise laptops and other electronic devices by screen size, hard disk size, hard disk type and video card manufacturer details, etc. In addition, the common price, brand, category, etc. should be included in the field headers. Such a field name would look like this, with all possible field names included:
title|link|description|id|price|image link|brand|category|size|color|style|fabric|screen size|hdd size|hdd type|video manufacturer
This is clearly not very appealing.
In addition, most articles would have a collection of separators with empty values for the categories they do not fit into.
Using Doofinder’s special attributes function, the above field name would be displayed as:
This is done by adding dynamic attributes to your products, as indicated in the following image:
For this purpose, the special field name attributes are used, and only the relevant attributes are added to each product in this way:
Doofinder will smartly separate them into different fields as needed.
Another example of a laptop categorisation before using the special attributes feature would be:
Toshiba Satellite L755|www.mygreatshop.com/laptop/toshibaL755.html|A powerful laptop with the best price you could find out there|1425|300.00|www.mygreatshop.com/img/toshibaL755|Toshiba|Laptops|||||17"|500Gb|Magnetic|NVidia
By using the special attributes function, it would then be:
Toshiba Satellite L755|www.mygreatshop.com/laptop/toshibaL755.html|A powerful laptop with the best price you could find out there|1425|300.00|www.mygreatshop.com/img/toshibaL755|Toshiba|Laptops|screen size=17/hdd size=500Gb/hdd type=Magnetic/video card=NVidia
Note: We use the forward-slash symbol ( / ) to separate different attributes of the same item. However, there may be cases where it is necessary to use ( / ) as part of the value of an attribute, such as 1/4 oz and 1/2 oz, etc. In such a case, we include the backslash (\ ) before the ( / ) as follows
1\/2 oz, 1\/4 oz.
This is different from how we enter the (/ ) as part of a value in the faceted search.
The Faceted Search
Another data feed feature that will make using the Doofinder search engine even better is the “Faceted Search“. Facets feature lets you filter search by certain fields.
This feature allows your website visitors to refine their product searches with filters such as brand, price, colour, material, etc.
In order to use the facet function in your data feed, the following must be taken into account:
- If the value of the field to be used for the facets is unique for each product, you do not have to do anything else. For example, the brand field.
- If a product can have several values of a facet (e.g. colour, size, etc.) the values must be separated by the / character, thus: blue/red/green.
- However, if you want to include / as part of the value (say you want to use 1/4oz and 1/2oz as part of your possible values for a facet), use another / before, so 1oz / 1//2oz / 1//4oz.
- Note that this is different from how we include / in special attributes.
- If your feed has products grouped by categories and subcategories, and you want to filter them, make sure that the categories are separated by > having the most general category as the first one. Therefore, the category tree would look like this:
Hardware > Hard Drives > SSD
In this case, SSD is a subcategory within hard disks, which are also a subcategory of hardware.
You can also have several category trees for one product. Just separate them with %%. An example of a category field would be:
Hardware > Hard Drives > SSD %% Desktops > Peripherals > HDD
This is an example of an article with appropriate values for the facets:
23|New hard drive|23.43|Acme|Hardware > Hard Drives > SSD|http://www.acme.com/23|http://www.acme.com/23.jpg|blue/red/green|It stores a lot of stuff
Should you encounter any problems, please contact email@example.com
Last updated: Jan 2022