In this article, we will see how to use expertrec’s custom search extractor feature. A extractor is usually used to extract certain portions of your website to display in expertrec’s custom search engine.
Usually a custom extractor is used when the automatic extractor fails to meet your needs.
Here is how you can use the custom extractor.
There are two components you can control in your expertrec search engine-
- Image
- Search content
To use the custom search extractor, follow the steps below
- Create your custom search engine using https://cse.expertrec.com/?platform=cse
- Go to crawl->Advanced -> Manual extraction.
- Under Image, enter your Image CSS selector and CSS attribute.
- Under Search content enter your CSS selector and CSS attribute.
- Click Save.
Lets take an example for the following page.
Here our aim is to create a custom search engine for products. We will take a sample product page and use its structure to create the search engine components.
Here is a product page that we want to configure using our selector for appearing in the search results. Here is a product ACR 1926 . The same settings will apply to other products as well which have a similar structure.
How to get image css selector?
- Right click on the image
- Click on inspect element
- Right click on the highlighted code.
- Go to copy-> copy selector.
- Paste in the search content CSS selector.
- Click save.
How to get search content css selector?
- Right click on the text.
- Click on inspect element
- Right click on the highlighted code.
- Go to copy-> copy selector.
- Paste this in the image content CSS selector.
- Click save.
Now you can check the search engine for this product.
As you can see, the components you mentioned in the search control panel are reflected in the search results.