Hi Guys,
Today’s topic is on,
How to enable search feature in Orchard CMS 1.7.2.0!
Most of the web developers who were/are working on Orchard must be shocked to believe that “search feature in Orchard CMS” is by default “Off” and tell that orchard framework search not working or guessing how to enable search in orchard cms. But, not to worry – Search functionality is just turned off by default and will get an error “Please define a default search index“. That doesn’t say – search feature is not available on Orchard CMS.
What you will learn in this tutorial?
1. To enable search feature in orchard cms
2. To add a search box onto your website front-end
I myself wondered how to get this stuff done! That’s when I saw some of the screenshots on this post “Creating-custom-content-types“. Where-in, I saw that there was a “Check-box” field under every display name for every content type created.
[Checkbox] Index this content type for search
But, that particular line didn’t appear with a check-box in any of the content types when I installed Orchard CMS. See below – I have circled it in read.

Enable search feature in Orchard CMS before creating index for custom content types
Then, I thought of creating a field where it would ask the admin to Check/tick the option of indexing any content type created or pre existed. However, you have to enable all the 3 modules including Indexing, Search and Lucene to achieve this as seen here in the Orchard documentation website.
Search feature in Orchard CMS
Can be achieved by enabling some modules that are freely available in the “Module section” of the Orchard CMS Dashboard. Follow all the below steps to enable search in your Orchard CMS.
By default you have to install/enable 3 modules:
Go to Dashboard -> Modules
- Indexing
- Search
- Lucene
Since, there are many modules listed out – you can feel free to use the “Filter” feature provided. Just type the module name in the filter box and it will be picked up and shown to you. You have to just click on the enable link on the right top of every module.
Indexing module:

Enable search feature in Orchard CMS using – Indexing module
Search module:

Enable search feature in Orchard CMS using – Search module
Lucene module:

Enable search feature in Orchard CMS using – Lucene module
Its not yet over – we have still work to be done after this. This is where all the 3 installed modules take their roles.
What we have to do is – Just scroll down you admin dashboard, you will now see “Settings tab“. Click on the arrow located on the right side of the tab. Now you will see few more links have been added. Mainly the Indexes and Search. They were not listed previously before installing the above 3 modules. See below screen shot – I have circled them in read.

Enable search feature in Orchard CMS – Search and Indexes item appear in the settings tab
What next?
- 1
- 2
- 3
Click on the “Indexes” link and it will take you to the “Create Index” page. Where you will be able to create an Index to your content types. If you create one – It will be displayed below all of your content types for you to Check/tick so that the CMS includes that content type to search index.
To be precise – When you create an Index here it will add this:
[Checkbox] Index this content type for “My_Search”
Where,
Checkbox - Is replaced with regular HTML input type checkbox
My_Search - Is replaced by the name you give while creating a new Index
Now click on the “Create” button

Enable search feature in Orchard CMS – Create new index
Once you click on the create button, it will then take you to the index creation page – where you can name the new index that you are about to create. In this case, I’ll name it as “My_Search“.

Enable search feature in Orchard CMS – Create new index – Providing Title
You should now see the success message!

Enable search feature in Orchard CMS – Create new index success message
Now, you can see that the Checkbox has been displayed in the content types for you to select.

Enable search feature in Orchard CMS – Creating search index for custom content types
Next process is that – You have to go to each custom content type you want to get indexed by, clicking on the “Content definition” on the left side of the dashboard and then clicking on any of the content type listed out there and Check/tick the “Checkbox” that you see above.
So, guys – This is how you enable search feature in Orchard CMS!
Adding a search box to your website front-end
By default your website does not come with a search box on its front-end. You have to manually add one. Please follow my next tutorial on how to add a search box. Below is the link to the next tutorial.
If you are stuck up any where – please feel free to put your questions in the form of comments in the comments section below this post. So that, I can answer your questions.
This was helpful to me, thanks!
You’re always welcome my friend!
How do I put search text box on a page after I enabled search and indexing?
Hi Tomo,
I have just amended this tutorial to also show – How you can add a ‘search box‘ onto the front-end of your website after you enable the search functionality.
You can see at the end of this tutorial. I have a link to the tutorial that explains you how to do it.
Its here: Add search box to orchard after you enable search functionality.
Thanks!
Sumesh M.S
Hi, I’m trying to get this to work but I keep getting “Default field can’t be empty” error, do you have any idea how to remedy this? I see that fields can be defined in content definitions so I tried making a few but it doesn’t fix the error…
Hi Jesse,
If you follow all the steps which I have listed out above – you should get your search function working. I think you should try from the start.
Remove/delete everything you did for search and then follow my tutorial without missing even a single step.
After this try – If you are still not able to get around it – get back to me.
Thanks!
Sumesh M.S
Hi Sumesh,
Firstly, This article helped a lot for such detailed steps on how to set up the search box and indexing.
I followed all steps. I can see the search textbox and a button.
My requirement is whenever a user types a keyword in the box and clicks search, if the keyword matches with the “tags” on any of the page then the page should be displayed in the search result.
i have set up “tags” for content type page and in the “search” index mgmt, i have also selected field types as “tags”.
Initially I was getting an error “page not found” when i click on the button, path: http://www.mysite.com/search?q=abcd. “abcd” is what i typed in the textbox. So i created a new page named it “search” and set the permalink as http://www.mysite.com/search.
Now the page does open up, when i click on button, but it is always empty. No search results.
If you can provide any inputs, it will be great help!
let me have a look at it Vaishakhi!
Hi sumesh,
I want to list the images in the search feature. Now I can only list titles, tags, descr… to the front end. How should I do this? Can u please help me?
Hi Devika,
By default, if you have images in any of your pages or posts with alt text and title – they should be listed out when you search with those terms!
Are you looking for something else?
Hi sumesh
I want to show images in the search list. Can you help me to give an idea about that?
Hi Sumesh,
I am trying to implement search functionality in my website.I followed your steps very seriously.But every time I search something,it is showing no result.I have no clue why its not working.Please help me.