|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Wednesday, October 14, 2009 1:58 AM
Points: 12,
Visits: 60
|
|
Hi Mike,
Thanks for responding. Unfortunately that didn't seem to do it. I notice that there is an explicit check for the "-" character in the "AndExpression" case statement in ConvertQuery and also a reference to the ExcludeOperator in the defintion of the AndOperator. I wonder does something need to be added to these also to make it recognise the "NOT" keyword? Or could it be a stopword issue?
Thanks
James
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, August 17, 2009 10:20 AM
Points: 8,
Visits: 25
|
|
I'm using this in my current project and it's working great. Thanks for taking time to put together a nice article we can all follow!
My site is used to search through a large technical publication. Everything has been working great, but a few days ago I typed in "orthostatic" and it threw an error.
I stepped threw the code and after the following:
AstNode root; root = _compiler.Parse("orthostatic");
"root" is coming back null, so when I pass it to:
string myString; myString = SearchGrammar.ConvertQuery(root, SearchGrammar.TermType.Inflectional);
the switch statement in the ConvertQuery method throws the error.
Before I do a "quick" workaround for nulls, I wanted to see if you had any insight on what might be causing this.
I've been using the search for quite a while and this is the only one that has caused an issue so far.
Btw, I'm using version 1.0 of the Irony.dll.
Thanks!
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, February 18, 2010 12:03 PM
Points: 8,
Visits: 95
|
|
Hi folks this is Roman, Irony developer Just wanted to let everybody know that I've refactored SearchGrammar to work with latest version of Irony and added it to Sample grammars in download. The original grammar and conversion method had been tweaked a bit, as some of the old functionality in Irony (node bubbling) had been refactored into similar but different thing. As a result, the output tree is different from Mike's version, but the query conversion result should be the same. I didn't try the new grammar against database, so cannot garantee 100% bug free status. Any comments, test runs against real SQL database would be appreciated thank you Roman
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Tuesday, March 02, 2010 3:50 PM
Points: 2,
Visits: 18
|
|
Dear Michael,
first of all, thank you very much for your articles, always very interesting for me.
Let's talk about your article related to the FTS features of SQL server (Google-like search).
I have ths problem: I would like to emulate the FTS feature inside a C# application, without calling my SQL server DB. That is, I simply want to have a routine taking in input a text string and a search string, and returning true or false if the search string matches or not the text string.
Do you know anything about this issue? Perhaps someone has already solved my problem...
Please, let me know something, I'm struggling about this dilemma!!! my email address is: cghersi@foldier.com
thank you very much!!
Cristiano
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, March 17, 2010 4:35 PM
Points: 1,133,
Visits: 703
|
|
outatime (6/1/2009)
I'm using this in my current project and it's working great. Thanks for taking time to put together a nice article we can all follow! My site is used to search through a large technical publication. Everything has been working great, but a few days ago I typed in "orthostatic" and it threw an error. I stepped threw the code and after the following: AstNode root; root = _compiler.Parse("orthostatic");
"root" is coming back null, so when I pass it to: string myString; myString = SearchGrammar.ConvertQuery(root, SearchGrammar.TermType.Inflectional);
the switch statement in the ConvertQuery method throws the error. Before I do a "quick" workaround for nulls, I wanted to see if you had any insight on what might be causing this. I've been using the search for quite a while and this is the only one that has caused an issue so far.  Btw, I'm using version 1.0 of the Irony.dll. Thanks!
I would bet you dollars to donuts the parser is picking out the keyword "or" from the front of the word. We had a similar issue previously that I believe was addressed on the message board here. Roman has also updated Irony and the search grammar over at the codeplex Irony project website. You might want to check that out, as his update might resolve the issue as well.
Thanks Michael
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, March 17, 2010 4:35 PM
Points: 1,133,
Visits: 703
|
|
james.spibey (3/30/2009) Hi Mike,
Thanks for responding. Unfortunately that didn't seem to do it. I notice that there is an explicit check for the "-" character in the "AndExpression" case statement in ConvertQuery and also a reference to the ExcludeOperator in the defintion of the AndOperator. I wonder does something need to be added to these also to make it recognise the "NOT" keyword? Or could it be a stopword issue?
Thanks
James
Yes, the - character is explicitly checked for in the AndExpression. Stopwords shouldn't be a factor until after it reaches SQL Server in the form of an iFTS query. Adding a new keyword (like "NOT") to the grammar might require some refactoring of the grammar itself.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, March 17, 2010 4:35 PM
Points: 1,133,
Visits: 703
|
|
rivantsov (6/11/2009) Hi folks this is Roman, Irony developer Just wanted to let everybody know that I've refactored SearchGrammar to work with latest version of Irony and added it to Sample grammars in download. The original grammar and conversion method had been tweaked a bit, as some of the old functionality in Irony (node bubbling) had been refactored into similar but different thing. As a result, the output tree is different from Mike's version, but the query conversion result should be the same. I didn't try the new grammar against database, so cannot garantee 100% bug free status. Any comments, test runs against real SQL database would be appreciated thank you Roman
Hi Roman, thanks! I'll download and test soon.
Michael
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, March 17, 2010 4:35 PM
Points: 1,133,
Visits: 703
|
|
cghersi (7/15/2009) Dear Michael,
first of all, thank you very much for your articles, always very interesting for me.
Let's talk about your article related to the FTS features of SQL server (Google-like search).
I have ths problem: I would like to emulate the FTS feature inside a C# application, without calling my SQL server DB. That is, I simply want to have a routine taking in input a text string and a search string, and returning true or false if the search string matches or not the text string.
Do you know anything about this issue? Perhaps someone has already solved my problem...
Please, let me know something, I'm struggling about this dilemma!!! my email address is: cghersi@foldier.com
thank you very much!!
Cristiano
Hi Cristiano,
iFTS is actually a SQL Server feature, and duplicating its functionality would require a huge investment of time and effort on your part. There is a .NET project (Lucene.Net) that provides full-text search functionality from within a .NET program: http://incubator.apache.org/projects/lucene.net.html. I haven't used this myself, but Hilary Cotter has recommended Lucene (Java version) in the past. If you don't need full-text search functionality, but just simple string comparison matching, the task gets a lot easier.
Thanks Michael
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, November 30, 2009 2:57 PM
Points: 1,
Visits: 5
|
|
I am perhaps loosing my mind, but the conclusion says code can be downloaded from the link above. But the only link I can find is to http://www.codeplex.com/irony, not the source for the article itself.
Thanks Derek
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, March 17, 2010 4:35 PM
Points: 1,133,
Visits: 703
|
|
derek (7/24/2009) I am perhaps loosing my mind, but the conclusion says code can be downloaded from the link above. But the only link I can find is to http://www.codeplex.com/irony, not the source for the article itself.
Thanks Derek
When it was first published the link was at the top of the article (as well as the bottom). The link at the top isn't there any more, but the link at the bottom still appears to be active (it's below the article).
Thanks Michael
|
|
|
|