I am trying to implement Linq To Lucene in my project, but when trying to search for something, I am always getting a Enumeration yielded no results
result and when I debug and try to open my [IndexContext].[TableProperty]
in the Watch
window, I am getting this message:
The predicate of a Lucene Term can not be the empty string.
I have tried searching in Google for this, but apparently it returned no results!
Has anyone ever encountered this message before? And how can I fix it? because currently it's not returning any data
[Update]
Apparently the problem is when I am using one of the Extension Methods (Between
, Match
, Like
etc...) that are found in Lucine.Linq.Extensions
. Take the following example:
var db = new MusicRepo_DB_IndexContext(@"C:\MusicRepoDB_index",
new MusicRepo_DBDataContext());
The following query returns a result: db.Artists.Where(a => a.Name == "Camel");
But this one doesn't: db.Artists.Where(a => a.Search("Camel"));
[Update]
Upon further testing, I realized that the Match
extension method does actually return a result, wheres as the other ones (Search
, Like
) don't. I'm still struggling with this issue