SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


«««678910»»

A Google-like Full Text Search Expand / Collapse
Author
Message
Posted Tuesday, August 18, 2009 5:34 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 18, 2010 12:03 PM
Points: 8, Visits: 95
All issues are fixed in the latest Irony source drop (08/18). International chars are now supported, no confusion of prefixes with matching operators. Please test it with database - I didn't test the actual transformation method.
Post #773141
Posted Tuesday, September 29, 2009 4:44 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 28, 2009 4:30 AM
Points: 2, Visits: 8
You can add (and replace existing) following lines to support all unicode characters:

 string additionalTermCharacters = "";
//Add international (unicode) characters
for (int i = 192; i < 512; i++)
additionalTermCharacters += (char)i;

// Terminals
var Term = new IdentifierTerminal("Term", "!@#$%^*_'.?" + additionalTermCharacters, "!@#$%^*_'.?0123456789" + additionalTermCharacters);
Post #795008
Posted Tuesday, September 29, 2009 11:58 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, October 28, 2009 4:30 AM
Points: 2, Visits: 8
I tried to compile it with newest Irony.
I managed to fix errors due to methods change on Irony, but Grammar doesn't work.

With just these changes (new Irony, and changed error handling) it gives me errors like Keyword is missing on start end...

Did anyone tried to use newest Irony?
Post #795538
Posted Wednesday, September 30, 2009 8:46 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 18, 2010 12:03 PM
Points: 8, Visits: 95
Use the SearchGrammar that is in Irony.Samples assembly in latest Irony sources
Post #795782
Posted Wednesday, September 30, 2009 8:59 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, March 17, 2010 4:35 PM
Points: 1,133, Visits: 703
Sorry I've been out of the loop for a while. Thanks for the update Roman! If you don't mind I'll grab the newest Irony DLL and rebuild the sample with the updated grammar, and ask Steve to put the new code up as a download for this article. It might take me until the weekend to get to it, but I've got it on the radar.

Thanks
Mike C
Post #795794
Posted Tuesday, October 13, 2009 9:19 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 15, 2009 12:28 PM
Points: 2, Visits: 18
developmentalmadness (10/15/2008)
Very cool. It's exactly what I needed. I'm implementing a search and didn't want users to have to learn FTS syntax. Thanks for your work.

I'm running into a problem with the OR operator. If I search for the term "orange" (no quotes in search, just for clarity here) I get the following error:

Syntax error, expected: OrExpression AndExpression PrimaryExpression ThesaurusExpression ThesaurusOperator ExactExpression ExactOperator ParenthesizedExpression ProximityExpression OrExpression'

If I search for "andes" (as in the mountains) I get the same error.

I tried changing the value of OrOperator.Rule by adding a space after "or" like this:

OrOperator.Rule = Symbol("or ") | "|";

And it seems to work. So I did the same with "and". I'd be interesting in having this confirmed that I'm not misunderstanding how this works and thus causing problems.


Just wanted to thank you for this easy fix. Worked like a charm for me.
Post #802495
Posted Wednesday, October 14, 2009 9:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 18, 2010 12:03 PM
Points: 8, Visits: 95
Again, I would like to point out that all these troubles with "or" and "and" prefixes should be gone if you use the latest version of Irony. There is also one big improvement in latest code drop of Irony - you can now try/test the search query converter directly from the Grammar Explorer test page. Download and use it please - and enjoy it!
Post #802838
Posted Thursday, October 15, 2009 12:35 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, October 15, 2009 12:28 PM
Points: 2, Visits: 18
rivantsov (10/14/2009)
Again, I would like to point out that all these troubles with "or" and "and" prefixes should be gone if you use the latest version of Irony. There is also one big improvement in latest code drop of Irony - you can now try/test the search query converter directly from the Grammar Explorer test page. Download and use it please - and enjoy it!


I am using asp.net 2.0 with vs 2005. I was under the impression that the new stuff was 3.5.
If I am wrong...great. Just did not want to break what is working for me.
Post #803660
Posted Sunday, October 25, 2009 1:10 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, November 06, 2009 9:40 PM
Points: 1, Visits: 2
If you you'd like to upgrade to the latest version of Irony, version 34726 Oct 13 2009, I did so with some code changes in Michael Coles code. The changes weren't major. In Irony, name spaces and method names were changed, so I updated Michael's code to reflect that.

First I download Irony and used irony-34726\Irony.Samples\FullTextSearchQueryConverter\SearchGrammar.cs to replace SearchGrammar.cs in Michael's project.

Next, (this is where my code will differ from Michael's, but you can follow it to make the needed changes) I had to change the way I called SearchGrammar. This is my code which you can use as a guide:

using System;
using System.Collections.Generic;
using Irony.Parsing;
using System.Data;

namespace Ronnie
{
public class Search
{
private static Parser _parser;

public static List<Ronnie.Link> DoSearch(string query) {
Ronnie.SearchGrammar grammar = new Ronnie.SearchGrammar();

if (_parser == null) _parser = new Parser(grammar);

ParseTree root = _parser.Parse(query.ToLower());
List<Ronnie.Link> links = new List<Ronnie.Link>();

if (root.Errors.Count == 0)
{
query = Ronnie.SearchGrammar.ConvertQuery(root.Root, Ronnie.SearchGrammar.TermType.Inflectional);

DataTable dt = Ronnie.Data.Search.Get(query);

foreach (System.Data.DataRow dr in dt.Rows)
{
links.Add(new Ronnie.Link(dr));
}
}

return links;
}
}
}

Post #808390
Posted Tuesday, November 10, 2009 1:23 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, March 11, 2010 2:35 PM
Points: 3, Visits: 9
While testing this against AdventureWorks, if I enter the complete text for title with a number for example Front Reflector Bracket and Reflector Assembly 3 it returns no results. Anything I am doing wrong?
Post #816784
« Prev Topic | Next Topic »

«««678910»»

Permissions Expand / Collapse