|
Home > Archive > IIS Index Server > September 2004 > Index Server Phrase Search - Error
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Index Server Phrase Search - Error
|
|
|
| Hello
I am new to Index Server, so forgive me if this is a pointless question.
I have set up Index Server for the first time today. The purpose being
that I have built an ASP.NET C# project in which the client wants me to
build a document search function. Index Server seems to be the answer.
After a couple of hours I got my first catalog created and added to it a
directory that contained 2 Word documents.
Now, it says cleary on several sites I have looked at, the following...
"Multiple consecutive words are treated as a phrase; they must appear in
the same order within a matching document."
This is rubbish.
As a test I put the words 'Brad Computer Dude' in one of the documents,
and in the other, I put the word 'Brad' alone.
(Note that I have not typed any of the quote ' characters in the query
box. They are here for clarity)
Now, using the 'Query the Catalog' option, I typed in 'Brad' and hit
search. It found 2 docuemnts. So far so good.
I then typed in 'Brad Computer'. However, tt still found the 2 documents.
Not the 1 and only document with that phrase. Huh?
I then typed 'Brad Computer Dude' and it STILL found the the 2 documents.
Remember, the words 'Computer' and 'Dude' do not appear at all in the
second document.
I have tried....
Brad and Computer
Brad near Computer
"Brad Computer" (<< this time with the "quotes")
What more is there? This very basic stuff. Without the ablilty to do a
simple phrase search this 'Index Server' is useless.
As another test I created a new catalog and in it created a directory that
points to our companies docuemnt store. 12,000 files. I then tried to find
a document that contained the phrase '<client> banner'. (Where <client> is
the name of our client).
Index Server returned 480 matches. Most of which had not reference to the
<client>. Only the word 'banner'
What am I missing here?
Thanks.
| |
| Hilary Cotter 2004-09-23, 9:13 am |
| I wouldn't characterize it as rubbish. The query done through the IS MMC is
a FreeText or fuzzy type of a query, so the documents found might have only
the word Brad, or only the word computer in it. Same applies to the search
on the word dude or banner.
The phrase "Multiple consecutive words are treated as a phrase; they must
appear in the same order within a matching document." pertains to a
Contains type query, which is not the default for the IS MMC query.
Its hard for for me to guess what mode you are querying in without looking
at your code.
If you are using ixsso this is a Contains/strict type query - which is what
you are looking code objQuery.Query="@contents Brad computer dude"
If you are using ado, this is a contains/strict type query 'Select DocTitle,
vpath, size, write from scope() where contains('+char(39)+char(34) +"brad
computer dude" +char(34) +char(39) +')'
--
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Dobly" <brad@Le_spamfree.zip.com.au.nospam> wrote in message
news:75f7ec8b9d5af52f394c4f3e6b46d3a2@lo
calhost.talkaboutsoftware.com...
> Hello
>
> I am new to Index Server, so forgive me if this is a pointless question.
>
> I have set up Index Server for the first time today. The purpose being
> that I have built an ASP.NET C# project in which the client wants me to
> build a document search function. Index Server seems to be the answer.
>
> After a couple of hours I got my first catalog created and added to it a
> directory that contained 2 Word documents.
>
> Now, it says cleary on several sites I have looked at, the following...
>
> "Multiple consecutive words are treated as a phrase; they must appear in
> the same order within a matching document."
>
> This is rubbish.
>
> As a test I put the words 'Brad Computer Dude' in one of the documents,
> and in the other, I put the word 'Brad' alone.
>
> (Note that I have not typed any of the quote ' characters in the query
> box. They are here for clarity)
>
> Now, using the 'Query the Catalog' option, I typed in 'Brad' and hit
> search. It found 2 docuemnts. So far so good.
>
> I then typed in 'Brad Computer'. However, tt still found the 2 documents.
> Not the 1 and only document with that phrase. Huh?
>
> I then typed 'Brad Computer Dude' and it STILL found the the 2 documents.
>
>
> Remember, the words 'Computer' and 'Dude' do not appear at all in the
> second document.
>
> I have tried....
>
> Brad and Computer
> Brad near Computer
> "Brad Computer" (<< this time with the "quotes")
>
> What more is there? This very basic stuff. Without the ablilty to do a
> simple phrase search this 'Index Server' is useless.
>
> As another test I created a new catalog and in it created a directory that
> points to our companies docuemnt store. 12,000 files. I then tried to find
> a document that contained the phrase '<client> banner'. (Where <client> is
> the name of our client).
>
> Index Server returned 480 matches. Most of which had not reference to the
> <client>. Only the word 'banner'
>
> What am I missing here?
>
> Thanks.
>
>
>
>
>
| |
|
| Ok. Then it was the documents I was reading that are rubbish, as they made
not mention of the 'Contains type query' or 'Contains/strict type query'
that you speak of. (Or perhaps a bit my haste to get it working is the
issue). :-)
It seemed pretty black and white to me that 'consecutive words are treated
as a phrase', when clearly, they are not. At least, not by default.
I tried the query in two places. The first was in the Index Server's
'Query the Catalog' page in the configuration tool in Control Panel, when
I first set up the catalog. And then later I tried in my C# page.. Here is
the code I am currently using..
string strCatalog = "TheClient_Documents";
string strQuery="";
strQuery = "Select DocTitle, Filename from Scope() where FREETEXT('" +
strKeywords + "')";
string connstring = "Provider=MSIDXS.1;Integrated Security .='';Data
Source="+strCatalog;
System.Data.OleDb.OleDbConnection conn = new
System.Data.OleDb.OleDbConnection(connstring);
conn.Open();
// etc etc.
But what you have suggested looks promising. I'm off now to try it out.
Tbanks for you help. I'll post back the results.
|
|
|
|
|