Вопрос

I am writing a program which will query a full text search index on Microsoft SQL Server 2005. The data being indexed are large blobs of text (multiple lines).

I need to extract only those lines of text which contain the search words for display with the results.

I therefore need to use the Sql Server word breaker and stemmer to determine if each line of text from the blob matches the search string, as I understand the standard word breaker and stemmer in Windows search uses a different algorithm.

I thought if I copied the two dlls (infosoft and langwrbk) from a SQL Server installation to the machine on which I am running my program, and ran regsvr32 on them, they would be installed in the registry, and I would be able to use them.

No such luck - running regsvr32 does not seem to add anything to the registry at all!

I have code which does the job with the word breaker and stemmer that comes with Windows, and it works, but I'm worried about the differences (which I have seen complained about in other posts here).

Это было полезно?

Решение

I used the code at COM without registering kindly provided by john-jeffery of this parish.

I had problems originally, until I realised the DLLs I was using were 64-bit, and the code I was using it from was 32-bit. Once I made the calling code 64-bit, everything worked. (I imagine I could have taken the DLLs from a 32-bit version of Sql Server if I wanted to stay 32-bit).

I have posted a test LinqPad script which uses both word breaker and stemmer to my blog, in case there is anyone else out there who wants to do the same thing.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top