chriseldredge / Lucene.Net.Linq

LINQ provider to run native queries on a Lucene.Net index
Other
151 stars 66 forks source link

Searching against Solr #52

Closed brazooka closed 10 years ago

brazooka commented 10 years ago

Chris, is it possible to point this package to a Solr location - passing the native lucene queries it builds from OData?

Thanks.

chriseldredge commented 10 years ago

The library is heavily tied to Lucene.Net constructs like Directory, IndexSearcher and IndexReader. To do this well it would probably be necessary to split out the LINQ query translation engine from the query execution and object mapping engine and replace them with something that sends the query to Solr and maps the response onto objects.

You currently can capture the query before it executes by using a custom IDocumentMapper that overrides PrepareSearchSettings, although you would have to set up a fake local RAMDirectory to get the library far enough along to get you to that point.