显示标签为“empty”的博文。显示所有博文
显示标签为“empty”的博文。显示所有博文

2012年3月29日星期四

Full text stuck in a rut - error msg 7619

I have a full-text index on a production db. The catalog is currently empty. When I try to populate it, I get a message saying I must enable full text for this database. When I try to run sp_fulltext_database 'enable', I get the following message:
Server: Msg 7619, Level 16, State 1, Procedure sp_fulltext_database, Line 61
Execution of a full-text operation failed. The process cannot access the file because it is being used by another process.
Our OS team could not find any processes other than sqlserver.exe using files in the FTData dir. MSSearch is currently owned by the localsystem account, and ownership has not been changed since the SQL Server install.
I am using SQL 2000 EE. on a Windows 2000 cluster. SP3A is installed.
Has anyone else come across this error? Any advice would be appreciated!

Quote:

Originally posted by lisanova22
I have a full-text index on a production db. The catalog is currently empty. When I try to populate it, I get a message saying I must enable full text for this database. When I try to run sp_fulltext_database 'enable', I get the following message:
Server: Msg 7619, Level 16, State 1, Procedure sp_fulltext_database, Line 61
Execution of a full-text operation failed. The process cannot access the file because it is being used by another process.
Our OS team could not find any processes other than sqlserver.exe using files in the FTData dir. MSSearch is currently owned by the localsystem account, and ownership has not been changed since the SQL Server install.
I am using SQL 2000 EE. on a Windows 2000 cluster. SP3A is installed.
Has anyone else come across this error? Any advice would be appreciated!

2012年3月27日星期二

Full Text Search with Empty Search String

Hi,

I have implemented full text search in one of my applications and i am using FREETEXTTABLE to perform the search. Actually i wanna to show all rows from the table whenever search string is empty,

Although i am currently using Dynamic sql to do this task, but i just wanna to know best practices to handle the situation ? Is there any way that i could use WildCard to return all rows?

Please suggest me a better way of doing it.

Thanks

/* You will need to adapt these examples */

/*This is the general pattern for returning the unfiltered record set

when the parameter is NULL. */

WHERE MyColumn = ISNULL(@.myVariable, MyColumn)

/*The following code snippets are taken from a production sproc that performs a complex search that includes a FULL-TEXT search. The input parameter is @.Keywords, it's DEFAULT = '' and the WHERE clause works if @.Keywords is NULL or not.

*/

--First

DECLARE @.KeywordNull1int

DECLARE @.KeywordNull2int

--second

IF @.Keywords = ''

BEGIN

SET @.KeywordNull1 = 1

SET @.KeywordNull2 = 1

END

ELSE IF @.Keywords <> ''

BEGIN

SET @.KeywordNull1 = 1

SET @.KeywordNull2 = 2

END

--third

--this is part of a complex WHERE clause

AND((CONTAINS(f.*,@.Keywords) OR (@.KeywordNull1 = @.KeywordNull2)) OR (CONTAINS(fl.*,@.Keywords) OR (@.KeywordNull1 = @.KeywordNull2)) OR (CONTAINS(FFT.*,@.Keywords) OR (@.KeywordNull1 = @.KeywordNull2)))

ORDER BY fl.FolderPath,[FileName],FileExtension

|||

Hi,

Thanks very much for your reply it will be very helpful for me in future projects, but i am using FREETEXTTABLE for search purposes not CONTAINS,

i am even not sure which one is better, Do you have any idea which one actually is ?

|||Since I have no idea what your SELECT statement that contains FREETEXTTABLE looks like or what you are trying to do I have no way to answer your question.|||

RE general question of comparison of CONTAINS/CONTAINSTABLE to FREETEXT/FREETEXTTABLE - none is better or worse, they are intended for different scenarios.

1) CONTAINS and CONTAINSTABLE have a simpler ranking function (called TF/IDF in Information Retrieval) and support a mini-query language that allows precise specification of the user's intent - is supports operators like AND, OR, NEAR, FORMSOF(INFLECTIONAL,...)/FORMSOF(THESAURUS,...) etc.

2) FREETEXT and FREETEXTTABLE are have more complex ranking (OKAPI BM 25 in IR terms) and are intended to more closely resemble Web search experience over full-text-indexed data in your database.

You may want to start with http://msdn2.microsoft.com/en-us/library/ms142494.aspx or more generally, at http://msdn2.microsoft.com/en-us/library/ms142547.aspx to get more details.

Best regards,

|||Thanks Denistch , it really helped me!!!|||

Hi Denistch,

Problem is still the same, let say if i use query select tblID from CONTAINSTABLE(Table1,*,'') as keytable where ....

so whatever the query is, if search string is empty, how can i use wildcard to return all the rows from Table1. e.g if i use something like CONTAINSTABLE(Table1,*,"a*") it will return all the matching words starting with 'a', but i dont want just 'a', i want all rows!!!

Any help will be highly appreciated .

I know i can use CONTAINS or LIKE, but i have got very long dynamic query, if change to CONTAINS it does'nt give me rank, so i would be changing the whole query just for one scenario....which i dont wanna do!

Thanx!

sql

2012年3月7日星期三

Full text catalog empty

Hi,

I'm not sure this is the right place for this thread but here goes.

I am trying to setup a full text catalog on one table in my database. Although the catalog is created fine and no erros are reported when creating or populating the catalog. It seems to be empty as its size is only 1Mb and my query:

select top 10* from kmuser.tbl_webpages
where contains (WebPageHTML_FT, '"aruba"'

returns no rows, while:

select * from kmuser.tbl_webpages
where webpagehtml_ft like '%aruba%'

returns 6 rows.

I have read several articles on the subject and have followed them to a T. I've deleted it and recreated so many times now both through Enterprise manager and through query analyser using the stored procedure sp_fulltext_catalog.

I've checked that full text catalog is enabled using:

select DATABASEPROPERTY(DB_NAME(), N'IsFullTextEnabled')

I am really stuck. Does anyone have any ideas?

Many thanks

This form is specific to Data Mining topics. You'll get better answers by posting to the SQL Server Database Engine forum at http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=93&SiteID=1

After recreating the full test catalog, did you Start a Full Population on the catalog?

|||

Thanks. I started a thread on the the other forum but no one has replied so far.

Yes I did start a full population but no change from my original problem

|||

The query you have searchs for the phrase "aruba" in the column. If you're searching for a prefix term, try the query:

select top 10* from kmuser.tbl_webpages
where contains (WebPageHTML_FT, '"aruba*"'

If you're searching for the term "aruba", then you can structure your query as:

select top 10* from kmuser.tbl_webpages
where contains (WebPageHTML_FT, 'aruba'

You can look up the documentation for CONTAINS at http://technet.microsoft.com/en-us/library/ms187787(SQL.90).aspx. Hope this helps

|||

You can check whether the fulltext catalog is populated using the following command

SELECT fulltextcatalogproperty('CatalogName', 'ItemCount');

Following on from Shuvro's point, your 2 searches are not identical as your contains clause will search for that standalone term whereas your like clause will search for that pattern anywhere in the column. As he suggests, check the wildcard options for CONTAINS.

eg pseudo code

create table1 (col1)

insert into table1 (space)

insert into table1 (lace)

insert into table1 (face)

select * from table where col1 LIKE '%ace%'

returns band, land, sand

select * from table where contains(col1, '"ace"')

returns 0 rows

Hope this helps!

full text catalog empty

Hi,

I am trying to setup a full text catalog on one table in my database. Although the catalog is created fine and no erros are reported when creating or populating the catalog. It seems to be empty as its size is only 1Mb and my query:

select top 10* from kmuser.tbl_webpages
where contains (WebPageHTML_FT, '"aruba"'

returns no rows, while:

select * from kmuser.tbl_webpages
where webpagehtml_ft like '%aruba%'

returns 6 rows.

I have read several articles on the subject and have followed them to a T. I've deleted it and recreated so many times now both through Enterprise manager and through query analyser using the stored procedure sp_fulltext_catalog.

I've checked that full text catalog is enabled using:

select DATABASEPROPERTY(DB_NAME(), N'IsFullTextEnabled')

I am really stuck. Does anyone have any ideas? Btw I am using SQL Server 2000 still

Many thanks

Is FulltextServices started, what do the logs of FullText Service tell you ?

Jens K. Suessmeyer.

http://www.sqlserver2005.de