Full Text Search - Neutral Language - Can't figure out why

  • Hi, guys.

    I'm working my head off of this and I can't figure out why this is happening.

    Could you please help me out or share your opinions and workarounds?

    I'm using the Full Text Search with the neutral language in the indexed columns. I have no stoplists so everything counts. We changed to neutral language because our customers don't have the need for language specific criteria. They just want raw text search.

    Everything was working great but then they found a term that they can't search and I can't figure out what's wrong. It comes down to this:

    SELECT * FROM sys.dm_fts_parser('"1.2.3.4"', 1033, NULL, 0);

    SELECT * FROM sys.dm_fts_parser('"1.2.3.4"', 0, NULL, 0);

    In the neutral language, the parser will return "3.4", differently than the English language parsing.

    In the 1033 language, the parser will break all the numbers into words and the result will show correctly.

    Do you think there is a workaround for this? I really don't want to change the language from neutral because it's working for every other query.

    Thank you.

    Best regards,

    Andre Guerreiro Neto

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • Sorry, guys. That doesn't explain my problem well.

    I made an example which is exactly what's happening.

    I appreciate any help since we have an SLA deadline with our customer and I don't know what else to do.

    CREATE TABLE dbo.fts_test

    (

    id INT PRIMARY KEY IDENTITY,

    textField VARCHAR(MAX)

    );

    INSERT INTO dbo.fts_test VALUES ('1.2.3.4');

    INSERT INTO dbo.fts_test VALUES ('RECLAMAÇÃO -1ª VARA CÍVEL DO FORO REGIONAL XII - NOSSA SENHORA DO Ó - DEMORA NO DESARQUIVAMENTO DO PROCESSO 0015814-80.2009.8.26.0020 - PROCEDIMENTO ORDINÁRIO - PARTES: MARIA LIGIA CARNEIRO ALVES E TELEMAR.');

    ALTER TABLE dbo.fts_test

    ADD CONSTRAINT uk_fts_test UNIQUE (id);

    CREATE FULLTEXT CATALOG ftscat_test;

    CREATE FULLTEXT INDEX ON dbo.fts_test (textField LANGUAGE 0)

    KEY INDEX uk_fts_test ON ftscat_test

    WITH CHANGE_TRACKING AUTO;

    -- value is shown correctly

    SELECT *

    FROM dbo.fts_test

    WHERE CONTAINS(textField, '"0015814-80.2009.8.26.0020"', LANGUAGE 1033);

    -- nothing is returned

    SELECT *

    FROM dbo.fts_test

    WHERE CONTAINS(textField, '"0015814-80.2009.8.26.0020"', LANGUAGE 0);

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply