Orchard & Sql Full-Text?

Topics: General, Writing modules
Aug 27, 2011 at 11:00 AM


I am moving a website over to Orchard CMS and have a little trouble with one of the requirements. What I have is a table of hotels, along with relevant info like City, State, etc. I need to create a search box that when users search for a City, it will bring up all results that are close to the input text (fuzzy search). Normally I would use SQL FULL TEXT for this, but I am not sure exactly how to go about this with Orchard (Also, I am new to the concept of CMS in general). So, any guidance you could give would be most appreciated.


Aug 27, 2011 at 10:43 PM

Let's say you would create a Hotel content type, with all associated columns. You can hook to an Indexing event which will let you provide every piece of data to be indexed (in Lucene), and from the admin you can define which fields have to be used when the search module is used. If you want to create custom search queries, then you can also add your own controller along with your module, which would do exactly what you need.