Sitecore Search is a crawl-based search engine. In this article, we will use the source to register data to be retrieved for search by Search.
![](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4CbB2fYntfPqDxLtLhVc9v%2F61e677e4db390f382c5c25b4cef968b6%2Fshannon-potter-bHlZX1D4I8g-unsplash.jpg&w=3840&q=75)
Adding Sources
The plug icon on the left side of the administration screen is the settings screen where you can enter information for crawling.
![SearchAddSource00.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7GEWnedh7eZ5qgcWvt7XDl%2Fdd4a2b6517265627cde66e421bdf4800%2FSearchAddSource00.png&w=1080&q=75)
When you click on the button, you will initially see a blank source screen. Click on the Add Source button in the upper right corner.
![SearchAddSource01.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F2CjzI5xjJBJIPxRCNIjgX%2F8792fd6a03fa4f4ff4d192365f4f96f6%2FSearchAddSource01.png&w=3840&q=75)
We will set up resources related to the sources to be added. In this case, we will include the following data
Name | Value |
---|---|
Source name | haramizucom |
Description | haramizu.com |
Connector | Web Crawler ( Advanced ) |
![SearchAddSource02.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F5pNrSwQpAq4bMDsL7sQJKR%2Fddb61d50b42c0e27dc64dbda52d58cd2%2FSearchAddSource02.png&w=1920&q=75)
Click Save to save the new source. You will be asked to set what kind of data you want to import for this source.
![SearchAddSource03.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F69u4b5RSA0RPZMjlD08E5l%2F87f6f607f8de7ab9ca0d0a89b283ab49%2FSearchAddSource03.png&w=3840&q=75)
Web Crawler Settings
We will configure the crawler behavior. First, it is important to note that when crawling by URL, there is an "Allowed Domain" field. If this field is left blank, the crawler will crawl external links on the crawled page. In this case, we will set "haramizu.com" since it is only within the site.
![SearchAddSource04.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7pR2invzch8jfLN99utXcV%2F94848680f12c2548cc622da08e13272d%2FSearchAddSource04.png&w=1920&q=75)
Next, configure the settings for the crawler's agent. This is set in the Header field, this time with the name "sitecorebot".
![SearchAddSource09.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6O9l0e1ZBKDdG73fP3m06w%2F1d2208202c16607b4ad53ed2d05b0ad8%2FSearchAddSource09.png&w=1920&q=75)
Available Locales
Since this blog is only in Japanese, set the crawl language as Japanese.
![SearchAddSource05.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6ztPv9jYf3yLug4wxywbYM%2F5e3c9affec50e0e6228728edf8bd4427%2FSearchAddSource05.png&w=1920&q=75)
Triggers
For triggers, we will use RSS feeds, but you can also choose to use sitemap.xml, etc. Please look at your site's data to determine what trigger to set if necessary.
![SearchAddSource06.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7IlapI6HQbl7Z1BOMBIPMV%2F170f9c190e1486170cb10e8fce7608f9%2FSearchAddSource06.png&w=1920&q=75)
Document Extractors
The next setting is Document Extractors, which translates to document extraction tool settings. In other words, we will set which values the crawler will retrieve.
In this case, we will use the Xpath items that are deployed by default.
![SearchAddSource07.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F71qlWlat7QUHnBh9wOMgJ5%2Ffa56e8723dc780adbce577e78594cb0d%2FSearchAddSource07.png&w=3840&q=75)
If you go to Tagger.
![SearchAddSource08.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7y00RlngtnhSTl7CkRu2Pl%2F42203285db25ec2264b8789af4fef471%2FSearchAddSource08.png&w=1920&q=75)
Launch Xpath Helper, see our previous blog post on Xpath Helper.
The Tagger set up is as follows
Attribute | Rule type | Rule value |
---|---|---|
description | Expression | //meta[@property='og:description']/@content |
image_url | Expression | //meta[@property='og:image']/@content |
name | Expression | //meta[@property='og:title']/@content |
type | Expression | //meta[@property='og:type']/@content |
url | Expression | //meta[@property='og:url']/@content |
Check if the Rule Value can be retrieved on the page using the Xpath Finder. The screen below shows the screen where the data is checked using the Description.
![SearchAddSource10.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F4m4Mei42atRloyzJdUIwfJ%2Fd84d6ce0188a55dca6ef5c249bffb50e%2FSearchAddSource10.png&w=3840&q=75)
Start of crawl
After completing the above settings, click the Publish button. A dialog box will appear as shown below.
![SearchAddSource11.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F1BcsydVPiCk0SyFQMV10sV%2Fca6a99c55d27e25334fc2a8cb2118f94%2FSearchAddSource11.png&w=1920&q=75)
Wait for a while for the data to be added to the crawler's queue.
![SearchAddSource12.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F7p7uTWRYlP8sCkvPUXYWQW%2F26adfc22d163e6dd491bd5967ba578af%2FSearchAddSource12.png&w=3840&q=75)
After a short time, the crawl is completed and the data is stored in Search.
![SearchAddSource13.png](/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fzi1ovlormku8%2F6kopC2R3fbI9kngyya9OIH%2F0620e97b2ac950585c1ead48c33f5e29%2FSearchAddSource13.png&w=3840&q=75)
Summary
In this issue, we have proceeded to the crawler setup. In the next issue, we would like to check how the imported contents are stored.