JS extraction allows you to extract information from the webpage that is not part of the search index.
The information that is part of the search index for a particular URL can be obtained by testing the URL in the Test One URL section of the control panel. The Raw data you see will contain all the fields that are part of the search index.
If a field is not available as part of the raw data, then the data can be crawled using JS extraction. To perform a JS extraction, Navigate to Crawl > Advanced > JS Extraction and follow these instructions.
- 1. Click the Add icon to add an empty Field function.
- 2. Enter the Field Name in the input box.
- 3. Click the Expand icon to type the JS code.
- 4. Once the JS code is complete, click on Update to save.
- 5. To check if the added JS code is extracting the field data, go to Test JS Extraction.
Here, add the URL of the webpage containing the field information and click on Quick Check.
This will load the search snippet with the View Raw data option.
If the JS extraction worked properly, then you should see the extracted field in the data.
Once the field is extracted successfully, go to the Home section of the control panel and perform a Recrawl.