MultiTerm API fuzzy search error - Incorrect syntax near the keyword 'and'

Hi all,

after upgrading to GroupShare 2014, we are getting an error when we try to perform a fuzzy search through the MultiTerm API. The error message is this:

Incorrect syntax near the keyword 'and'

Normal (non fuzzy) search works fine with the same parameters.

These are the application versions we have:

Sdl.Multiterm.MatrixCacheSrvc.exe: 11.0.1062 ExecutionService.exe, ApplicationService.exe: 1.2.3634

Do you have an idea if this is a bug or maybe I'm using some wrong parameters?

(For me, this seems to be an MSSQL error message with an SQL query)

 

Thanks in advance,

Tamas Meszaros

Parents Reply Children
  • In the meantime, I have let SQL server log the problematic queries, this is what I have found (after a fuzzy search with a filter):

    select origterm, termid, conceptid from [I_Deutsch] where termid IN (534885,534910,534837,527937,504250,504229 and ( (conceptid in (select entryid from mtFieldsValues where [index] = N'Deutsch' and [level] = 1 and [path] = N'dG[d/@type=''Fachgebiet'']/d' and [complete_value] like N'%Client%' escape '\' ))))

    It is clear that a closing bracket is missing before the bold and.

    The query after the problematic "and" seems to be related to entry filters. I tried the same search without an entry filter as well, and this time it worked. So the problem arises only with fuzzy search and entry filter at the same time.

    Can you please look after this?

    Thanks,

    Tamas

  • Hi Tamas,

    Thank you for the additional information on this. We will look at this and get back to you.

    Cheers,

    Best regards,
    Luis Lopes | Principal Product Manager | RWS | (twitter) @Luis___Lopes |

  • Thanks, in the meantime I have also create a minimum code to reproduce the issue:

    var app1 = new SDL.Multiterm11.Application();

               string user = Console.ReadLine();

               string password = Console.ReadLine();

               var repo = app1.ServerRepository;

               try

               {

                   repo.Location = "http://localhost";

                   repo.Connect(user, password);

                   var tb =

                       repo.Termbases.OfType<SDL.Multiterm11.ITermbase>().FirstOrDefault(t => t.Name.StartsWith("Test"));

                   if (tb == null)

                       Console.WriteLine("Termbase not found");

                   tb.Search.SearchExpression = "elev";

                   tb.Search.FuzzySearch = true;

                   tb.Search.SourceIndex = "Deutsch";

                   tb.Search.TargetIndex = "Deutsch";

                   tb.Search.MaximumHits = 25;

                   tb.Search.StartingEntryID = 0;

                   tb.Search.LastTerm = "";

                   tb.FilterDefinitions.OfType<IFilterDefinition>().First(f => f.Name == "Test_filter").Active = true;

                   foreach (HitTerm ht in tb.Search.Execute())

                   {

                       Console.WriteLine(ht.Text);

                   }

               }

               finally

               {

                   repo.Disconnect();

               }