Sử dụng Search Module trong Drupal như thế nào?

Sử dụng Search Module trong Drupal như thế nào?

A lot of things are simple in Drupal ... once you know how.

The search module is a perfect example of something that is initially confusing to set up, but easy once you know how do it correctly.

This week we had several questions from our members about the Search module, so we wrote this tutorial to help them out. There are several confusing elements to Drupal's search module. Let's address them one-by-one:

Confusion #1: Indexing isn't instant

When you write a new content item for your Drupal site, it appears on your site:

media_1366985171978.png

However, when you search for the content, it can't be found:

media_1366985198133.png

So here's the first point of confusion: your content will not be indexed instantly after it has been added to the site.

Confusion #2: How to re-index the site

After users have tried and failed to find their new content, they often head to Configuration > Search settings. This is a logical step. Even when you visit this page, the information seems helpful.

In the image below, I see that there is 1 new item that needs to be indexed:

media_1366985223543.png

However, if you click the "Re-index site" button, it won't produce the result you helped for.

media_1366985303815.png

So that's the second point of confusion: Configuration > Search settings isn't very helpful.

The correct way to get your site's content indexed is to go to Configuration > Cron.

Drupal's Search module requires a cron job to run correctly.

Inside Configuration > Cron, click on the "Run cron" button.

media_1366985431664.png

media_1366985361087.png

Now the Search module will successfully index your new content:

Confusion #3: When cron runs

On the Configuration > Cron screen, you can tell your site to run cron regularly. This should index your content automatically, but it's not always easy to tell when this will happen.

The cron job will be triggered by the first users who visits your site after the time period is up. So, even if you have the cron set to run every 3 hours. it won't run until the next visitor arrives.

This is one reason why people can become confused by using the Search module on development sites where vistiors are rare.

Sử dụng Search Module trong Drupal như thế nào?

via ostraning

Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Khanh Hoang

Khanh Hoang - Kenn

Kenn is a user experience designer and front end developer who enjoys creating beautiful and usable web and mobile experiences.

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Giới thiệu quảng cáo PPC-PPA là gì?

Giới thiệu quảng cáo PPC-PPA là gì?

SEM là từ viết tắt của Search Engine Marketing, dịch và hiểu theo nghĩa tiếng Việt là phương pháp tiếp thị thông qua các công cụ tìm kiếm. SEM là một hình thức Internet Marketing và là một phương pháp marketing nhằm tăng sự hiện diện của bạn hay doanh nghiệp, tổ chức thông qua công cụ tìm kiếm.

Hướng dẫn xử lý văn bản tốt hơn với AutoCorrect

Hướng dẫn xử lý văn bản tốt hơn với AutoCorrect

AutoCorrect cũng hoạt động trong Excel, Outlook và PowerPoint, mặc dù bạn không thể chọn trước văn bản trong các ứng dụng

Cách sử dụng các thẻ h1 h2 h3

Cách sử dụng Headline tags trong một page hiệu quả

Cách sử dụng các thẻ h1 h2 h3 … là rất quan trọng để bố cục và phân chia nội dùng phù hợp.  SEO123 sẽ hướng dẫn các bạn cách sử các thẻ Heading sao cho phù hợp.

Công ty diệt chuột T&C

 

Diet con trung