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

2012年3月27日星期二

Full Text Searching

I am trying to run a full text serach on one field, a Varchar 2000.
say the field contains:
(before you break the seal of your new product box, please be careful to read all the instructions) ...for example
I search for keywords that may be in this field
Like:
product box
seal
instructions
and this row is included in the result set

but I would like to leave out words like all pronouns and 'a' and 'I' ...words that aren't going to matter to the search.

Does someone know where I can stgart in doing this full text searching?

Thanks,
EricWell I still haven't found much on this
Got the following articles
http://www.freevbcode.com/ShowCode.asp?ID=4224
(zip file is empty)
and http://www.microsoft.com/sql/evaluation/features/fulltext.asp (just says nothing really)

Do anyone know how this full text search works... an example perhaps?

Would be greatly appreciated.
Thanks,
Eric|||Can someone tell me please where this is wrong?
sSQL.Append("and (sr.description_of_problem = isnull(@.description, FREETEXT(sr.description_of_problem, @.description)) or sr.description_of_problem is null) ")|||look into"noise words" and"filters" in the full text search problem.

Full text searches and/or CONTAINS in MS SQL 2005

Hiya,

I have recently become responsible for a small database for a volunteer soccer league. I am reasonably savvy when it comes to development, but I have not had a lot of experience with administration before.

I need to do what I think must be pretty simple: set up full text indexing so I can use a CONTAINS search on a table. The table contains all of the fields the kids use, and each field has a number of divisions that typically play on that field; we use these 'favored divisions' to make scheduling a little easier. Now, one day when I have time, I will set up a proper, normalized, one-to-many relationship between the favored divisions and the playing fields, but right now it's basically like this:

fieldID (int, primary key, identity seed)
fieldName (varchar), e.g. High School Field
favored_divisions (varchar) - comma-delimited list of divisions, e.g. G10,B14,G12

I imagine it's probably database sacrilege to have a comma-delimited list like that, but we don't have the resources now to re-write that piece of the web application. My question is, in SQL Server 2005, what do I need to do to be able to do a full-text search on this field with the following query:

SELECT fieldID, fieldName
FROM playing_fields
WHERE CONTAINS(favored_divisions,'G10')

Right now the query runs and does not return an error, but does not return any results, either. IIRC, full-text indexing is enabled by default in SQL Server 2005, but I am not familiar with the procedure -- something about having to populate a catalog. Do I need to edit or set up a new index on the actual playing_fields table? What has to happen to make this work?

Thanks very much,
Sam

Sam,

You do not need to use FTS for this. Simply use Charindex() or Like should do.

e.g.
SELECT fieldID, fieldName
FROM playing_fields
WHERE charindex(favored_divisions,'G10')<>0
--or
SELECT fieldID, fieldName
FROM playing_fields
WHERE favored_divisions LIKE '%G10%'

|||

You probably need to populate the index:

drop table playing_fields
go
create table playing_fields
(
fieldID int constraint PKplaying_fields primary key,
fieldName varchar(10) unique,
favored_divisions varchar(1000)
)
go
insert into playing_fields
select 1, 'one','G10,A01,B11'
union all
select 2, 'two','G12,A19,B21'
union all
select 3, 'three','G10,A21,B41'
union all
select 4, 'four','G03,A14,B11'
union all
select 5, 'Five','G02,A13,B01'
go

CREATE FULLTEXT CATALOG MyFirstFullText
IN PATH 'c:\mssql\data'
AS DEFAULT
AUTHORIZATION dbo
go
CREATE FULLTEXT INDEX ON playing_fields
(favored_divisions )
KEY INDEX PKplaying_fields
ON MyFirstFullText
WITH CHANGE_TRACKING OFF, NO POPULATION --the no population would be the thing that could cause this,
--though the default is to build the index.
go
SELECT fieldID, fieldName
FROM playing_fields
WHERE CONTAINS(favored_divisions,'G10')

--no results
go


ALTER FULLTEXT INDEX ON playing_fields
START FULL POPULATION

SELECT fieldID, fieldName
FROM playing_fields
WHERE CONTAINS(favored_divisions,'G10')

Returns:

fieldID fieldName
-- -
1 one
3 three

Note too that If you are only using it for the comma delimited list (and yes, a list like this is sacrilege :) and the amount of data is reasonable, just use a like:

SELECT fieldID, fieldName
FROM playing_fields
WHERE ',' + favored_divisions + ',' like '%,G10,%'

This also returns:

fieldID fieldName
-- -
1 one
3 three

This will require a table scan, but I will bet your set is probably small enough for this, depending on how large the league is :)

|||

Re:

SELECT fieldID, fieldName
FROM playing_fields
WHERE ',' + favored_divisions + ',' like '%,G10,%'

Clever use of where, I'd never thought of that. But then I guess if I were anything like a hardcore DBA, I wouldn't have such an offensive list in a table anyway!

These both look like good solutions. Probably no point in setting up a whole FTS if I'm ultimately going to rewrite this as a proper table anyway. Thank you both!

sql

full text search weighting on different columns

Hi,
I've not used FT much, but I've successfully created a CONTAINSTABLE query
on a database that contains names and addresses, using a wildcard for the
field names.
Can anyone please point me in the right direction for info on how to
"weight" one field over another? For example - if someone searches for
"John", the system needs to rank "John Smith" in the "name" column over "10
St John St" in the "address1" column.
Thanks in advance,
Dunc
Duncan,
You must join two or more CONTAINSTABLE from the same table or multiple
tables and then use the appropriate weight for each predicate, for example
using the Northwind table Employees and two FT-enabled columns:
SELECT e.LastName, e.FirstName, e.Title, e.Notes
from Employees AS e,
containstable(Employees, Notes, 'ISABOUT (BA weight (.2) )', 10) as A,
containstable(Employees, Title, 'ISABOUT (Sales weight (.5) )', 15) as
B
where
A.[KEY] = e.EmployeeID and
B.[KEY] = e.EmployeeID
Regards,
John
"Duncan Welch" <dunc@.ntpcl.f9.co.uk> wrote in message
news:OqE2ZoWWEHA.2636@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I've not used FT much, but I've successfully created a CONTAINSTABLE query
> on a database that contains names and addresses, using a wildcard for the
> field names.
> Can anyone please point me in the right direction for info on how to
> "weight" one field over another? For example - if someone searches for
> "John", the system needs to rank "John Smith" in the "name" column over
"10
> St John St" in the "address1" column.
> Thanks in advance,
> Dunc
>

2012年3月26日星期一

Full Text Search Query

Hi,
If i write: SELECT * FROM Table1 WHERE Contains(*, ' "the" OR "horse" '), no
problem.
But the query SELECT * FROM Table1 WHERE Contains(*, ' "the" AND "horse" ')
returns an error, because the word 'the' is in the black list.
On my website, the users can check a checkbox if they want a search on all
the words they have entered.
Is there a way (something else having my own blacklist and removing by
myself the black words before sending the query to SQL Server...) to avoid
this error ?
If the only way is to use my own blacklist, is there a way to retreive the
SQL Server's one ?
Thanks.Steph wrote on Mon, 21 Mar 2005 16:34:21 +0100:

> Hi,
> If i write: SELECT * FROM Table1 WHERE Contains(*, ' "the" OR "horse" '),
> no
> problem.
> But the query SELECT * FROM Table1 WHERE Contains(*, ' "the" AND "horse"
> ') returns an error, because the word 'the' is in the black list.
> On my website, the users can check a checkbox if they want a search on all
> the words they have entered.
> Is there a way (something else having my own blacklist and removing by
> myself the black words before sending the query to SQL Server...) to avoid
> this error ?
> If the only way is to use my own blacklist, is there a way to retreive the
> SQL Server's one ?
You can remove the list of words from the SQL Server noise word file, or
remove the words from your query. I ended up clearing out my noise word
file. It depends on your installation path (and possibly SQL Server version)
as to where your noise word files are, mine are in
\MSSQL7\FTDATA\SQLServer\Config. As my server is configured for English my
noise word file is noise.enu, but I also edited noise.eng. If you decide to
remove all the noise words from the config, do not empty the file
completely - leave a single line with a space on it. You'll have to
repopulate your catalogs if you change your noise word file so that the
words you have removed are added to the catalogs.
BTW: a more appropriate group for this is
microsoft.public.sqlserver.fulltext :)
Dan|||Steph,
In addition to what Daniel says below... Yes, the full path to the noise
word files (noise.enu) is SQL Server version specific, I usually shorten it
to the files under \FTDATA\SQLServer\Config. Note, that noise.enu = US
English, noise.eng = UK English and noise.dat = Neutral and are related to
the column-specific "Language for Word Breaker" in the FT Indexing wizard.
Also, run a Full Population after modifying the noise word files.
You may also want to review KB article 246800 (Q246800) "INF: Correctly
Parsing Quotation Marks in FTS Queries" at:
http://support.microsoft.com//defau...kb;EN-US;246800
For other SQL FTS resources see "SQL Server 2000 Full-Text Search Resources
and Links" at:
http://spaces.msn.com/members/jtkane/Blog/cns!1pWDBCiDX1uvH5ATJmNCVLPQ!305.e
ntry
Regards,
John
--
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"Daniel Crichton" <msnews@.worldofspack.co.uk> wrote in message
news:um7ny3iLFHA.656@.TK2MSFTNGP14.phx.gbl...
> Steph wrote on Mon, 21 Mar 2005 16:34:21 +0100:
>
'),
all
avoid
the
> You can remove the list of words from the SQL Server noise word file, or
> remove the words from your query. I ended up clearing out my noise word
> file. It depends on your installation path (and possibly SQL Server
version)
> as to where your noise word files are, mine are in
> \MSSQL7\FTDATA\SQLServer\Config. As my server is configured for English my
> noise word file is noise.enu, but I also edited noise.eng. If you decide
to
> remove all the noise words from the config, do not empty the file
> completely - leave a single line with a space on it. You'll have to
> repopulate your catalogs if you change your noise word file so that the
> words you have removed are added to the catalogs.
> BTW: a more appropriate group for this is
> microsoft.public.sqlserver.fulltext :)
> Dan
>

Full Text Search Indexing HTML - does the filter expect certain tags to be present as standard?

Hi, I was wondering if any SQL Server gurus out there could help me...

I have a table which contains text resources for my application. The text resources are multi-lingual so I've read that if I add a html language indicator meta tag e.g.
<META NAME="MS.LOCALE" CONTENT="ES">
and store the text in a varbinary column with a supporting Document Type column containing ".html" of varchar(5) then the full text index service should be intelligent about the language word breakers it applies when indexing the text. (I hope this is correct technique for best multi-lingual support in a single table?)

However, when I come to query this data the results always return 0 rows (no errors are encountered). e.g.
DECLARE @.SearchWord nvarchar(256)
SET @.SearchWord = 'search' -- Yes, this word is definitely present in my resources.
SELECT * FROM Resource WHERE CONTAINS(Document, @.SearchWord)

I'm a little puzzled as Full Text search is working fine on another table that employs an nvarchar column (just plain text, no html).

Does the filter used for full text indexing of html expect certain tags to be present as standard? E.g. <html> and <body> tags? At present the data I have stored might look like this (no html or body wrapping tags):

Example record 1 data: <META NAME="MS.LOCALE" CONTENT="EN">Search for keywords:

Example record 2 data: <META NAME="MS.LOCALE" CONTENT="EN">Sorry no results were found for your search.

etc.

Any pointers / suggestions would be greatly appreciated. Cheers,
Gavin.

UPDATE:
I have tried wrapping the text in more usual html tags and re-built the full text index but I still never get any rows returned for my query results. Example of content wrapping tried - <HTML><HEAD><META NAME="MS.LOCALE" CONTENT="EN"></HEAD><BODY>Test text.</BODY></HTML>

I've also tried stripping all html tags from the content and set the Document Type column = .txt but I still get no rows returned?!?I've further isolated what the problem is and have started a new thread to request more specific help...
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1844786&SiteID=17

2012年3月25日星期日

Full Text Search in SQL Server 2000

I'm having trouble retrieving results from a SP that uses the Contains
or FREETEXT functions.
CREATE PROCEDURE dbo.bugFuzzySearchDesc
@.SearchTerm varchar(2048)
AS
SELECT
issue_id,
issue_description
FROM
bug_issues
WHERE
FREETEXT(issue_description, @.SearchTerm);
/*CONTAINS(issue_description, @.SearchTerm);*/
The Parameter that gets passed to the SP looks like this:
'"Mercury*" OR "Midware*"'
The column being searched on has the following value in one particular
record:
"Setup Mercury Midware for Mercury Payment Systems"
Yet, the query returns no results.
--
Warm Regards,
Lee
"Upon further investigation it appears that your software is missing
just one thing. It definitely needs more cow bell..."Lee enlightened me by writing:
> "Setup Mercury Midware for Mercury Payment Systems"
> Yet, the query returns no results.
Never mind. I'm using a DB on our hosted website and they
re-index/re-populate the catalogs very 24hrs. Makes sense if it's an
expensive process...
--
Warm Regards,
Lee
"Upon further investigation it appears that your software is missing
just one thing. It definitely needs more cow bell..."

2012年3月22日星期四

Full Text Search Engine in Chinese Simplied

contains(name,'"张三"')

will not find the row in database with column named "name" and "张三" is sure there,but will find '张三一','张三二' why?

name column is sure in the fulltext category and data population is finished!ID Name Sex
-
1 张三 男
2 张三一 男
3 张三二 女
4 张三四 女
I execute the T-SQL Statement : contains(name, '"张三"'),and the Result :

ID Name Sex
-
2 张三一 男
3 张三二 女
4 张三四 女
Why the Row named 张三 is not in result?|||While I don't read Chinese, could you reply with the full output of the following SQL code?

select objectproperty(OBJECT_ID(N'<table_name>'), 'TableFulltextItemCount')

use <your_database_name_here>
go
SELECT @.@.language
SELECT @.@.version
EXEC sp_help_fulltext_catalogs
EXEC sp_help_fulltext_tables
EXEC sp_help_fulltext_columns
EXEC sp_help <your_FT-enable_table_name_here>
go

Please, note the LCID values from sp_help_fulltext_columns for the FULLTEXT_LANGUAGE column. This information should help identify what the problem is for your Full Text Search (FTS) enabled table.

Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/

|||This is due to wordbreaking behaviour in Chinese Simplified wordbreaker. '张三一' is got broken into '张' and '三一'. You could try freetext instead of contains to allow some fuzziness into the query.

select * from Table1 where freetext (*, N'张三')

Full Text Search Engine in Chinese Simplied

contains(name,'"张三"')

will not find the row in database with column named "name" and "张三" is sure there,but will find '张三一','张三二' why?

name column is sure in the fulltext category and data population is finished!ID Name Sex
-
1 张三 男
2 张三一 男
3 张三二 女
4 张三四 女
I execute the T-SQL Statement : contains(name, '"张三"'),and the Result :

ID Name Sex
-
2 张三一 男
3 张三二 女
4 张三四 女
Why the Row named 张三 is not in result?
|||While I don't read Chinese, could you reply with the full output of the following SQL code?

select objectproperty(OBJECT_ID(N'<table_name>'), 'TableFulltextItemCount')

use <your_database_name_here>
go
SELECT @.@.language
SELECT @.@.version
EXEC sp_help_fulltext_catalogs
EXEC sp_help_fulltext_tables
EXEC sp_help_fulltext_columns
EXEC sp_help <your_FT-enable_table_name_here>
go

Please, note the LCID values from sp_help_fulltext_columns for the FULLTEXT_LANGUAGE column. This information should help identify what the problem is for your Full Text Search (FTS) enabled table.

Thanks,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/

|||This is due to wordbreaking behaviour in Chinese Simplified wordbreaker. '张三一' is got broken into '张' and '三一'. You could try freetext instead of contains to allow some fuzziness into the query.

select * from Table1 where freetext (*, N'张三')

Full text search can not return result

Hi all,
In my case, I build a full text search query. like "select * from _tt_fields where contains(string,'"development group"')", when I click F5 then execute the sql, it returned the records, but when I click execute the query more than 4 times, it does not return anything!
From http://www.developmentnow.com/g/104_0_0_0_0_0/sql-server-fulltext.htm
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Very rarely when you are in the middle of a merge you may get an
inaccurate count like what you are seeing. it lasts for milli-
seconds.
On Jan 16, 4:56 am, ken<nos...@.developmentnow.com> wrote:
> Hi all,
> In my case, I build a full text search query. like "select * from _tt_fields where contains(string,'"development group"')", when I click F5 then execute the sql, it returned the records, but when I click execute the query more than 4 times, it does not return anything!
> Fromhttp://www.developmentnow.com/g/104_0_0_0_0_0/sql-server-fulltext.htm
> Posted via DevelopmentNow.com Groupshttp://www.developmentnow.com

full text search and verbs forms

Hi,
I'm running win 2003 and sql 2000 sp3a in spanish.
When I search in a full text query for a verb (using contains and not an
inflectional search) the result include the correct verb form but also
the various forms of that verb . For example if I search "comprar" the
results include "comprar".
I have the same problem if I search for a phrase containing verbs.
Is there a way to solve this problem?
Thanks in advance,
Robert.
Robert,
Could you post the actual CONTAINS query you are using? Specifically, are
you using a trailing asterisk "*" wildcard in your query?
Also, you should know that SQL 2000 FTS is accent insensitive regardless of
the database or table collation.
Regards,
John
"Robert" <rbroggi@.seciu.edu.uy> wrote in message
news:40A0FFDA.1090404@.seciu.edu.uy...
> Hi,
> I'm running win 2003 and sql 2000 sp3a in spanish.
> When I search in a full text query for a verb (using contains and not an
> inflectional search) the result include the correct verb form but also
> the various forms of that verb . For example if I search "comprar" the
> results include "comprar".
> I have the same problem if I search for a phrase containing verbs.
> Is there a way to solve this problem?
> Thanks in advance,
> Robert.
>
|||Hi John,
The query is: SELECT * FROM Textos WHERE CONTAINS(Texto,'"comprar
proximamente"')
The result include results like "comprar proximamente".
What do you mean by "SQL 2000 FTS is accent insensitive" ? I thought
that the full text engine was accent sensitive. For example if you
search "debera" will not be the same as "deberia". Is this correct?
Thanks for the help,
Robert.
John Kane wrote:
> Robert,
> Could you post the actual CONTAINS query you are using? Specifically, are
> you using a trailing asterisk "*" wildcard in your query?
> Also, you should know that SQL 2000 FTS is accent insensitive regardless of
> the database or table collation.
> Regards,
> John
>
> "Robert" <rbroggi@.seciu.edu.uy> wrote in message
> news:40A0FFDA.1090404@.seciu.edu.uy...
>
>

Full Text Search (2005) - How to determine word offset in CONTAINS query?

Does anyone know if it is possible to determine the relative word offset (the Occ) from a simple-term query such as:-

SELECT Comments
FROM Production.ProductReview
WHERE CONTAINS(Comments, ' "mountain biking" ');

So, given the text:-

"Maybe it's just because I'm new to mountain biking, but I had a terrible time getting used to these pedals."

I would like the query would return both the text and the word offset of 8. To me, it seems like this would be quite useful as I want to highlight the found text for the user to see. Obviously I can do a post-SELECT scan of the string to find the values but this would seem unnecessary.

If anyone can give me any pointers I'd be very grateful.

Thanks

You may want to post this on the database engine forum (for full-text search) - http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=93 since this is not a SQL Server Data Mining feature.|||I think I will, but I wasn't sure where to post the question as there isn't an FTS forum (yet!). Thanks for your suggestion.sql

Full Text Search & Visual Studio 2005

Hello, I have a database that has Full Text Search it works great under Management Studio Express. I can use the CONTAINS expression no problem.

Now when I try using the same database in Visual Studio 2005 the CONTAINS statement it doesn't return any values and I don't get any error messages.

The way I call my database from my web.config file is as follows:

<add name="MyDB" connectionString="Data Source=.\FULLTEXTSEARCH;Integrated Security=True;AttachDBFilename='D:\My Documents\Visual Studio 2005\WebSites\App_Data\MyDataBase.mdf';User Instance=false" providerName="System.Data.SqlClient"/
Why doesn't Full Text Search work when I use it from my web application and it does work under SQL Server Management Studio Express?

Please help,

Louis

Me again, I do get an error message when I try to run a query in Visual Studio 2005, namely:

Full-Text Search is not installed, or a full-text component cannot be loaded.

But it works just fine in Management Studio Express.

|||

I figured out my on problem. I was running the wrong database, my bad.


2012年3月21日星期三

Full text search - ends with option

I am implementing full text serach option in my project.

Its working fine for Begins with ("Text*")

Contains("Text")

But I am not able get the results for ends with ("*Text")

SELECT * FROM CATALOGUE_INDEX WHERE CONTAINS(SHORT_DESCRIPTION,'*OCK')

Now I am expecting the rows which are having "Stock" as value in short_desciption column.

But I am not getting the result.

Please advise me on how to do the same

Regards

Muralimohan

SQL Server doesn't support leading wildcards in FullText search. Therefore your first query will be searching on "ock" only explaining why no results are returned.

The only way to get round this as far as i know is to use the LIKE keyword.

sql

full text query problem in 2005

I am trying to do the following query
select * from privateSearchFT
where contains
(*,'"formsof(inflectional,produce)" OR
"formsof(inflectional,produce)"',language 1033)
The problem is that it found no result although
(*,'"formsof(inflectional,produce)"',language 1033) found some results.
Also how do I specify different language LCID for different search word.
Let say I want to search the combination of a chinese word and english word
and I want to use inflectional on the english word so that +s and +ed got
found too. how do I specify that in sql?
The second question. I have a table containing chinese/english mix data, I
currently use the Chinese word breaker on the table. but I want to search
on both chinese and english (including inflectional on english) What is
the best configuration for this?
Also does specifying the LCID on the sql slow down the process since I have
a lot of chinese/english mix data.
Thank you very much for you hel...
--Xin Chen
The language parameter does in general not affect performance for most
languages - however there is a slight impact with German and a more
significant impact (although still slight) while querying for the Far
East languages. There is a more significant while indexing.
It seems that you are querying on the same terms in your search phrase.
Perhaps if you tried a FreeText search which does implicit stemming
this might work better for you. You can only specify one language
parameter per contains perdicate, but you might be able to use two
contains or freetext predicates each with a different language.

Full text Problems

Hi all, my english is very bad, so i try to explain...

when i put the string

and Contains (PG.GenericTitleFullTxt,'"* Dias *" AND "* que *"AND "* Abalaram *" AND "* Mundo * "')

in my query, the results show up.... but is only i put the " * O * " in the search string and not shows ..something linke

and Contains (PG.GenericTitleFullTxt,'"* Dias *" AND "* que *"AND "* Abalaram *" AND "* O * " AND * Mundo * "')

All the conditions for the "and" exists....in my catalog i have the string

Dias que Abalaram O Mundo

many times..bu if i put the "O" in the search ...not shows nothing...

I droped the catalog, indexes..rebuild..etc...

Anyone can help me ?

Thanks..

First of all, you should leave the blank before and after the words, as the word breaker has already broken the words in the database to small pieces which can be recognized. if the words you are searching for are all single words you should also leave the * signs due to the same reasons mentioned above.

Jens K. Suessmeyer

http://www.sqlserver2005.de

Full Text Problem Help please

DECLARE @.Wrd varchar(50)
SELECT UName
FROM Basic
WHERE CONTAINS(UName, @.Wrd)
Im using the the following query to get the user name from the table if the
user doesn't know it all. Im using SQLEXPRESS 2005 and it says i can't use
full text searching. Is there anything I can do, or can sum1 give me a query
that does the same job on my version of SQL. Thank you.sum1 ?
Look up LIKE in Books Online.
There is no full-text indexing in SQL 2005 Express.
ML|||Eamon,
Please, checkout the "SQL Server 2005 Features Comparison" at
http://www.microsoft.com/sql/2005/p...05features.mspx under
"Manageability", see that "Full Text Search" for "Express" is not check
marked, and therefore Full Text Search (FTS) is not supported in the SQL
Server 2005 Express edition.
I am curious, if you had a "full-text search" feature that was functional as
a 3rd party add-on to SQL 2005 Express would you find it useful? What
features are you looking for?
Thanks,
John
--
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"eamon" <eamon@.discussions.microsoft.com> wrote in message
news:BCF75263-FB77-419E-9A09-55AD0E8FB363@.microsoft.com...
> DECLARE @.Wrd varchar(50)
> SELECT UName
> FROM Basic
> WHERE CONTAINS(UName, @.Wrd)
> Im using the the following query to get the user name from the table if
> the
> user doesn't know it all. Im using SQLEXPRESS 2005 and it says i can't use
> full text searching. Is there anything I can do, or can sum1 give me a
> query
> that does the same job on my version of SQL. Thank you.|||Well, I would be interested in a third party FTS tool. :) Have you seen
sqlTurbo?
ML|||ML,
Of course, its listed on my blog as SQL Turbo from Imceda. However, that's
not was what I was referring to, but more a low-cost T-SQL based FTS tool
for SQL Server 2000 MSDE or SQL Server 2005 Express. What features are you
looking for?
Thanks,
John
--
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"ML" <ML@.discussions.microsoft.com> wrote in message
news:9BA03825-F792-4638-A78A-9F293E55EEF5@.microsoft.com...
> Well, I would be interested in a third party FTS tool. :) Have you seen
> sqlTurbo?
>
> MLsql

full text problem

I have created a catalog from a table that contains only english with <html> tags. When i run a query against it i get

Server: Msg 7619, Level 16, State 1, Line 1
Langauge database/cache file could not be found.

I have read that setting full text to use the neutral word breaker may solve this problem, question is "How do i set it to use the neutral word breaker"

ThanksThe following articles may be helpful:

Article q246701 (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q246701)
Article q271818 (http://support.microsoft.com/default.aspx?scid=kb;EN-US;q271818)

full text problem

Sorry my poor english
I am using SQL SERVER 2005 FT-enable database,
my qruestion is
some query like :
select * from test where contains(description ,'二次金改')
return 343 records--ok
try again same query
return 343 records--ok

but try 4 times later the same query,
return 0 record --stranger
and continue try is alway return 0 recode

Next day try the same query ,
return return 343 records--ok
but same situation appear again-try 4 times later the same query
return 0 record

Hi,

Which database collation are you using? Are you using a Thesaurus, and which noise word file are you using. Sorry for the questions to your questions but it helps find the problem.

Can you recreate the problem with a simple test script that you could post?

Best regards

Trevor Dwyer

|||

Thank you for replay,

database collation: Chinese_Taiwan_Stroke_CI_AS

noise word :noiseCHS.txt

I am not using aThesaurus

USE [icdb02]
GO
/****** Object: Table [dbo].[picture] Script Date: 11/05/2006 14:27:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[picture](
[FileID] [char](15) COLLATE Chinese_Taiwan_Stroke_CI_AS NOT NULL,
[Photographer] [varchar](50) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[Place] [char](12) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[PaperID] [char](1) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[PictureDate] [smalldatetime] NULL,
[Description] [varchar](255) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[Available] [char](1) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[TimeLimit] [smalldatetime] NULL,
[DeleteDate] [smalldatetime] NULL,
[Processed] [char](1) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[OperatorID] [char](15) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[InputDate] [smalldatetime] NULL,
[InputID] [char](15) COLLATE Chinese_Taiwan_Stroke_CI_AS NULL,
[rowguid] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT [DF_picture_rowguid] DEFAULT (newid()),
[picstamp] [timestamp] NULL,
CONSTRAINT [PK_picture] PRIMARY KEY CLUSTERED
(
[FileID] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF

2012年3月19日星期一

Full text newbie...

Hi, group,
Made these days some tests and not understand very clear how contains or
containstable perform the search.
The catalog was built on 2...5 columns, various scenarios.
I tried with 2 words I am sure they exists in 2 different fields, but
contains nor containstable does not return those records. I tried both
"Johny Walker" and "Johny" AND "Walker" and no succes.
Is there any syntax allowing me to find "Johny" in a field AND "Walker" in
other field, in the same record, both fields included in FT catalog?
Thank you,
Renato
Not really. Both words must be in the same column with a Contains search, a
FreeText search can look across columns.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Renato Aranghelovici" <renatoa@.rdslink.ro> wrote in message
news:OYRS%234SIGHA.3000@.TK2MSFTNGP14.phx.gbl...
> Hi, group,
> Made these days some tests and not understand very clear how contains or
> containstable perform the search.
> The catalog was built on 2...5 columns, various scenarios.
> I tried with 2 words I am sure they exists in 2 different fields, but
> contains nor containstable does not return those records. I tried both
> "Johny Walker" and "Johny" AND "Walker" and no succes.
> Is there any syntax allowing me to find "Johny" in a field AND "Walker" in
> other field, in the same record, both fields included in FT catalog?
> Thank you,
> Renato
>
|||Ok, thank you.
This responded only partially to my initial request: if I want to find all
records that contains "Johny" in any indexed field AND "Walker" in other
indexed field ( or both in the same field) is this possible with free text
search ? And how?
Thank you,
Renato
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:u1CeLYVIGHA.3348@.tk2msftngp13.phx.gbl...
> Not really. Both words must be in the same column with a Contains search,
> a FreeText search can look across columns.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Renato Aranghelovici" <renatoa@.rdslink.ro> wrote in message
> news:OYRS%234SIGHA.3000@.TK2MSFTNGP14.phx.gbl...
>

full text issue

I have issue in production full text search where using contains cluase with
long name of client and companies e.g. Robert M Junior Estate if my
contains clause has Robert and M and Junior - it does not return any rows
but if it is Robert and Junior it will return the rows. I have similar test
environment with same version of SQl2000 sp4 and it works when I provide all
3 criterias. I have tried to reproduce on test but unable to produce it.
Tried to dropped the catalogue and rebuilded twice on production,
repopulated. Matching noise files on test and production also.
Any idea ?
Please help
Manoj.
M is a noise word and one behavior of full-text search is that a noise word
cause no results to return. So, I suspect that there is actually a
difference in the noise word files. Please double-check its contents.
Also make sure that the production and test indexes are defined to use the
same language. (I have some British English columns with no noise words and
some English columns with noise words.)
Note: A noise word file with no noise words needs at least a space in it.
(Or an impossible word, such as supercalifragalisticexpialidocious.)
RLF
"Manoj" <Manoj@.discussions.microsoft.com> wrote in message
news:E612A941-B35C-4918-A8C8-CBF77E40BEA2@.microsoft.com...
>I have issue in production full text search where using contains cluase
>with
> long name of client and companies e.g. Robert M Junior Estate if my
> contains clause has Robert and M and Junior - it does not return any
> rows
> but if it is Robert and Junior it will return the rows. I have similar
> test
> environment with same version of SQl2000 sp4 and it works when I provide
> all
> 3 criterias. I have tried to reproduce on test but unable to produce it.
> Tried to dropped the catalogue and rebuilded twice on production,
> repopulated. Matching noise files on test and production also.
> Any idea ?
> Please help
|||I have tried replacing noise word files from production to test and
rebuilded catalogue and still works in test but not in production
"Russell Fields" wrote:

> Manoj.
> M is a noise word and one behavior of full-text search is that a noise word
> cause no results to return. So, I suspect that there is actually a
> difference in the noise word files. Please double-check its contents.
> Also make sure that the production and test indexes are defined to use the
> same language. (I have some British English columns with no noise words and
> some English columns with noise words.)
> Note: A noise word file with no noise words needs at least a space in it.
> (Or an impossible word, such as supercalifragalisticexpialidocious.)
> RLF
> "Manoj" <Manoj@.discussions.microsoft.com> wrote in message
> news:E612A941-B35C-4918-A8C8-CBF77E40BEA2@.microsoft.com...
>
>
|||Manoj,
Did you double-check the language definition of your full-text indexes?
RLF
"Manoj" <Manoj@.discussions.microsoft.com> wrote in message
news:61D160A2-8CA6-483A-8999-2AF0E789C447@.microsoft.com...[vbcol=seagreen]
>I have tried replacing noise word files from production to test and
> rebuilded catalogue and still works in test but not in production
> "Russell Fields" wrote: