var test = searchCriteria.Field("nodeName", "hello".Fuzzy(0.8)).Complie();
But keep getting missing reference error
'string' does not contain a definition for 'Fuzzy' and no extension method 'Fuzzy' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)
The code in that article has a small but very important typo and you'll get a message similar to;
error CS1928: 'string' does not contain a definition for 'Fuzzy' and the
best extension method overload 'Examine.LuceneEngine.SearchCriteria.LuceneSearchExtensions.Fuzzy(string,
float)' has some invalid arguments
The 0.8 will default to a double in c# so you're line of code should read;
var test = searchCriteria.Field("nodeName", "hello".Fuzzy(0.8f)).Complie();
@Connie, sorry, I misunderstood. The original question was about a missing reference.
After doing some debugging, I think I can give you a somewhat definitive answer that using both Fuzzy AND Boost on the same search phrase is _not_ possible.
The type that Fuzzy and Boost return is "Examine.LuceneEngine.SearchCriteria.ExamineValue"
Examine - missing Fuzzy & Boost?
Trying to use Fuzzy and Boost as follows
var test = searchCriteria.Field("nodeName", "hello".Fuzzy(0.8)).Complie();
But keep getting missing reference error
'string' does not contain a definition for 'Fuzzy' and no extension method 'Fuzzy' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)
Using Umbraco 4.7.1.Beta - any ideas?
I ran into this same problem, been scratching my head for a while now, finally found the namespace to include;
@using Examine.LuceneEngine.SearchCriteria;
From the code I suspect, like me, you were looking at this article,
http://umbraco.com/follow-us/blog-archive/2011/9/16/examining-examine.aspx
The code in that article has a small but very important typo and you'll get a message similar to;
The 0.8 will default to a double in c# so you're line of code should read;
var test = searchCriteria.Field("nodeName", "hello".Fuzzy(0.8f)).Complie();
What about fuzzy AND boost. That was the original question. Seems lots of problems and no solutions being posted.
Fuzzy and boost are extension methods. Make sure you are including the correct namespaces.
@using Examine;
@using Examine.SearchCriteria;
@using Examine.LuceneEngine.SearchCriteria; <- This one has Fuzzy / Boost extension methods
I have that one already:
I can get one or the other but not both, Fuzzy AND Boost.
@Connie, sorry, I misunderstood. The original question was about a missing reference.
After doing some debugging, I think I can give you a somewhat definitive answer that using both Fuzzy AND Boost on the same search phrase is _not_ possible.
The type that Fuzzy and Boost return is "Examine.LuceneEngine.SearchCriteria.ExamineValue"
That object has three members:
Fuzzy = 0,
SimpleWildcard = 1,
ComplexWildcard = 2,
Explicit = 3,
Escaped = 4,
Boosted = 5,
Proximity = 6,
Examineness can only be set to a single enum value, so you can pick one and only one enum value for each instance of IExamineValue.
is working on a reply...