chriseldredge / Lucene.Net.Linq

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

Fuzzy support #63

Closed tamasflamich closed 10 years ago

tamasflamich commented 10 years ago

I added initial fuzzy support that seems to work well in simple cases like:

provider
    .AsQueryable<Entity>()
    .Where(x => (x.Name == "search term").Fuzzy(0.6f))
    .ToList();

provider
    .AsQueryable<Entity>()
    .Where(x => (x.Name == "search term").Fuzzy(0.6f) || (x.Name == "search term 2").Fuzzy(0.6f))
    .ToList();

However it fails in more complex cases like:

provider
    .AsQueryable<Entity>()
    .Where(x => (x.Name == "search term" || x.Name == "search term 2").Fuzzy(0.6f))
    .ToList();

I would be happy too see such feature in an official release.

chriseldredge commented 10 years ago

Thanks!

Some unit (integration) tests demonstrating that this feature works would be helpful.

Also, please rebase (squash) your changes into a single commit.