Restricting search to a specific content type

Topics: Customizing Orchard, Writing modules
Mar 11, 2012 at 7:19 AM

Hi:

I am adding some extra fields to the user content type.

What I'd like to be able to do is to restrict the search functionality to only search for user content items and then allow a user to search on fields within that content type.

could I use the Lucine/search module as the back end of a module to do this, or am I going to have to write my own search code?

Help apreciated as always.

Cheers

San.

Coordinator
Mar 11, 2012 at 7:47 AM

You'll need to write code for sure (about a couple of lines of it), but you should definitely build it on the existing Lucene stuff. Inject an ISearchService and query with it.

Coordinator
Mar 11, 2012 at 5:46 PM

Awesome idea. Make projections work with any QueryProvider, then Filters, Search and Layout could be used to customize search queries, or external feed queries ... But too much for what you need.

Mar 11, 2012 at 11:55 PM

Hi:

How would we go about doing this, ideally what I need is a user changeable projection.

Cheers

Sean.

From: sebastienros [email removed]
Sent: 11 March 2012 16:46
To: Sean Farrow
Subject: Re: Restricting search to a specific content type [orchard:348151]

From: sebastienros

Awesome idea. Make projections work with any QueryProvider, then Filters, Search and Layout could be used to customize search queries, or external feed queries ... But too much for what you need.