Pregunta

Tengo SQL Server 2005 Express Edition con Advanced Services. He activado FullText y ha creado un catálogo de la siguiente manera:

create FullText catalog MyDatabase_FT in path 'mypath' as default

I creó entonces un índice de texto completo como sigue:

create FullText index on Cell (CellName) key index PK_Cell
    with CHANGE_TRACKING AUTO

Me ejecuta las siguientes consultas:

1) select count(*) from Cell where contains (CellName, 'CU*')
2) select count(*) from Cell where CellName like 'CU%'

y consiguió los siguientes resultados:

1) 0
2) 24

Me doy cuenta de que podría tomar algún tiempo para rellenar los índices de texto completo. Sin embargo, a pesar de tanto tiempo (12 horas) Todavía no da resultados positivos. entonces investigarse más a fondo usando el OBJECTPROPERTYEX () y ejecutado la siguiente:

declare @id int
select @id = id FROM sys.sysobjects where [Name] = 'Cell'
select 'TableFullTextBackgroundUpdateIndexOn' as 'Property', objectpropertyex(@id, 'TableFullTextBackgroundUpdateIndexOn') as 'Value'
union select 'TableFullTextChangeTrackingOn', objectpropertyex(@id, 'TableFullTextChangeTrackingOn')
union select 'TableFulltextDocsProcessed', objectpropertyex(@id, 'TableFulltextDocsProcessed') 
union select 'TableFulltextFailCount', objectpropertyex(@id, 'TableFulltextFailCount') 
union select 'TableFulltextItemCount', objectpropertyex(@id, 'TableFulltextItemCount') 
union select 'TableFulltextKeyColumn', objectpropertyex(@id, 'TableFulltextKeyColumn') 
union select 'TableFulltextPendingChanges', objectpropertyex(@id, 'TableFulltextPendingChanges') 
union select 'TableHasActiveFulltextIndex', objectpropertyex(@id, 'TableHasActiveFulltextIndex') 

Esto dio los siguientes resultados:

TableFullTextBackgroundUpdateIndexOn 1 | TableFullTextChangeTrackingOn 1 | TableFulltextDocsProcessed 11024
TableFulltextFailCount 0
TableFulltextItemCount 4038
TableFulltextKeyColumn 1 | TableFulltextPendingChanges 0
TableHasActiveFulltextIndex 1

Entonces trató de hacer un llenado completo fresco del índice de la siguiente manera:

alter fulltext index on Cell start full population

Y me da la siguiente advertencia:

Warning: Request to start a full-text index population on table or indexed view 'Cell' is ignored because a population is currently active for this table or indexed view.

Me trató una población de actualización de la siguiente manera:

alter fulltext index on Cell start update population

Esta devuelto:. "Comando (s) completó con éxito", sin embargo todavía no da resultados positivos en la búsqueda de texto completo

¿Qué me falta? ¿Qué necesito hacer para conseguir el funcionamiento de búsqueda de texto completo?

Gracias, Elan

¿Fue útil?

Solución

Bueno, todo se reducía a adoptar el formato del texto de búsqueda.

Esto era incorrecto:

select count(*) from Cell where contains (CellName, 'CU*')

Este es correcta:

select count(*) from Cell where contains (CellName, '"CU*"')

Todo está funcionando bien!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top