Using full Lucene Query Syntax - Autofac question

Topics: Writing modules
Nov 1, 2013 at 3:15 AM
As I exposed here, I would like to be able to query freely on the index without Orchard building the query for me.

I built a module, and inserted a copy of the SearchController, adding a new route...
To override default Orchard behavior concerning the query, I had to create new implementations of : ISearchService, IIndexManager, ISearchBuilder, IIndexProvider.
There are minor modifications from their default implementations, but they are needed.

That works as expected, but it currently override the default search too.
This is because I used the same interfaces and autofac takes my implementations.

I would like to be able to leave the default implementation untouched (at url /Search), and add my implementation at url (/LuceneSearch for example)

I suppose I must tell Autofac to use my implementations only for my controller by creating a class that inherits the autofac Module class.
Here is my problem : I don't know how to tell Autofac to use by default the Orchard Implementation, and just for my controller, use my implementation....

Another possibility is to create new interfaces, but it seems to me not really beautiful...

Can someone help me ? :)

Thanks