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

2012年3月27日星期二

Full text search workaround?

Me and a friend are setting up a .net project on a shared hosting server....the thing is, they dont seem to allow the use of full text search....when i connect to the server on Enterprise Manager, the option for "Create new catalog" is disabled.

we need to give users the ability to search by keywords......what's a good workaround for this without using FTS?

any advice?

thanks.

G.Create queries that use the wildcart % for all the fields you want to search in ...
Only way you can do it ...|||Here is a nice example of some searching logic.

http://weblogs.sqlteam.com/jeffs/archive/2004/11/02/2460.aspx|||

% wildcards work really slow u should be carefull...

find a way to use full text search.

sql

2012年3月26日星期一

Full text search microsoft index server on .NET using C#

Hi,
I used the following code for an index search on specific folder.
{
//create a connection object and command object, to connect the Index
Server
System.Data.OleDb.OleDbConnection odbSearch = new
System.Data.OleDb.OleDbConnection( "Provider=\"MSIDXS\";Data
Source=\"SearchFolder\";");
System.Data.OleDb.OleDbCommand cmdSearch = new
System.Data.OleDb.OleDbCommand();
//assign connection to command object cmdSearch
cmdSearch.Connection = odbSearch;
//Query to search a free text string in the catalog in the contents of
the indexed documents in the catalog
string searchText = txtSearch.Text.Replace("","");
cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
characterization from scope() where FREETEXT(Contents, "+ searchText
+") order by rank desc ";
odbSearch.Open();
I m able to get the TEXT search results. But full text search results
are reqiuired... like suppose if i search for experts release then i
need to get those documents where both the words exists..not only one
word.
Please let me know how to do this on .NET using C#.
Awaiting for the response.
Regards,
Rojasri.
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/Full-Text-se...ict228634.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=790451
use a contains based search for this.
ie
//Query to search a free text string in the catalog in the contents of
the indexed documents in the catalog
string searchText = txtSearch.Text.Replace("'","''");
cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
characterization from scope() where CONTAINS(Contents, '"+ searchText
+"') order by rank desc ";
BTW - this is an indexing services question. It should be posted in
Microsoft.public.inetserver.indexserver
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
"rojasree" <UseLinkToEmail@.dbForumz.com> wrote in message
news:4_790451_42f97e43956785fa721f58da989a05d8@.dbf orumz.com...
> Hi,
> I used the following code for an index search on specific folder.
> {
> //create a connection object and command object, to connect the Index
> Server
> System.Data.OleDb.OleDbConnection odbSearch = new
> System.Data.OleDb.OleDbConnection( "Provider=\"MSIDXS\";Data
> Source=\"SearchFolder\";");
> System.Data.OleDb.OleDbCommand cmdSearch = new
> System.Data.OleDb.OleDbCommand();
> //assign connection to command object cmdSearch
> cmdSearch.Connection = odbSearch;
> //Query to search a free text string in the catalog in the contents of
> the indexed documents in the catalog
> string searchText = txtSearch.Text.Replace("'","''");
> cmdSearch.CommandText = "select doctitle, filename, vpath, rank,
> characterization from scope() where FREETEXT(Contents, '"+ searchText
> +"') order by rank desc ";
> odbSearch.Open();
>
> I m able to get the TEXT search results. But full text search results
> are reqiuired... like suppose if i search for 'experts release' then i
> need to get those documents where both the words exists..not only one
> word.
> Please let me know how to do this on .NET using C#.
> Awaiting for the response.
> Regards,
> Rojasri.
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL:
http://www.dbforumz.com/Full-Text-se...ict228634.html
> Visit Topic URL to contact author (reg. req'd). Report abuse:
http://www.dbforumz.com/eform.php?p=790451
sql

2012年3月22日星期四

Full text search in image BLOB

We have a ASP.net 2.0 CMS in which the pages are saved in the database as a
BLOB in the table: ASPNET_PersonalizationAllUsers.
Is there a way to search in these BLOB? I have tried to search with FTS but
cannot find the needed iFilter.
Can you help?When creating a full-text index on a varbinary(max) column (or an image
column in SQL 2000) a separate column must be used to store the type of
content (the file extension) - e.g. ".doc" for Word files or ".html" for HTM
L
files.
What exactly is the problem?
Maybe this might also help:
http://milambda.blogspot.com/2006/0...n-or-bybug.html
ML
http://milambda.blogspot.com/sql

2012年2月26日星期日

full outer join

hello
i know that this post is not related to asp.net forum but if anyone can help me.
i have made three sql tables called table1,table2 and table3.
each one contains primary field called employeeid
table1 contains in addition to the primary a field callled field1.
table2 contains in addition to the primary a field callled field2.
table3 contains in addition to the primary a field callled field3.
the first time table1 contains one record
employeeid field1
---- --
1353 abc
the second table contains no data
the third table contains also one record
employeeid field3
---- --
1353 def
i have made a query :
select field1,field2,field3 from table1
full outer join table2 on table1.employeeid=table2.employeeid
full outer join table3 on table2.employeeid=table3.employeeid
the result is :
field1 field2 field3
abc null null
null null def
when i delete the record from the first table and put it in the second empty table:
the result :
field1 field2 field3
null abc def
i need to understand the results ?
i know that the outer join will get the rows from the both tables,but the results how can i get i don't understand
thank you for the help

The results you are getting is because OUTER JOIN defaults mathematically to a NULL so you need to use the ISNULL function with your replacement value. And I cannot remember now but OUTER JOIN have fixed table placement in the query to get expected results. BTW strange things happening with OUTER JOIN is normal. Hope this helps.