Showing posts with label indexing. Show all posts
Showing posts with label indexing. Show all posts

Friday, March 30, 2012

question about searching with indexing service

Trying to limit the search using scope but I am having some problems. When I search with just FROM SCOPE(), the search works just fine. But when I try and do FROM SCOPE ('"/mydirectory"'), i get the following error.Compiler Error Message:BC30451: Name 'mydirectory' is not declared.

strSearch = "SELECT RANK, FileName, Path, VPath, Characterization, DocTitle, Size, DocAppName FROM SCOPE('"/mydirectory"') WHERE FREETEXT('" & trim(lblsearchstr.text) & "') ORDER BY RANK DESC"


anyone have a solution. all resources i can find seem to set the scope in the same way. also can not find any articles that mention such an error.|||

figured it out. need two double quotes.

SCOPE('""/mydirectory""')

and if you use a variable you need 3 double quotes

SCOPE('""" & myVar & """')

|||

gww:

figured it out. need two double quotes.

SCOPE('""/mydirectory""')

and if you use a variable you need 3 double quotes

SCOPE('""" & myVar & """')

I just tried this (I put up a similar question a few days ago in 'Other Data Sources,' since I didn't really think of Indexing Service as SQL Server per se), and while it doesn't generate any exceptions, the search no longer returns results properly (in fact, it doesn't return any).

Thoughts?|||Hoping someone else sees this, because I'm completely out of ideas. I've tried:

FROM SCOPE('DEEP TRAVERSAL OF ("policy")') End of statement expected
FROM SCOPE('("policy")') End of statement expected
FROM SCOPE('DEEP TRAVERSAL OF ("C:\Inetpub\wwwroot\policy\")') Character constant must contain exactly one character
FROM SCOPE('DEEP TRAVERSAL OF ('C:\Inetpub\wwwroot\policy\')') Incorrect syntax near '''. Expected URL. SQLSTATE=42000
FROM SCOPE("/policy") Name 'policy' is not declared.
FROM SCOPE('DEEP TRAVERSAL OF "/policy"') Name 'policy' is not declared.

in addition to the method recommended above.

Wednesday, March 28, 2012

Question about Proximity (NEARness) with Full Text Indexing on SQL Server 7

Hello group,
Does anyone know how near a word needs to be to another word to be
included in the results of a CONTAINS search that uses NEAR? Is this
setting adjustable? Is is stored in the registry? INI or config file?
I'm using SQL Server 7 SP3.
Thanks,
Kelly Greer
KellyGreer1@.nospam.com
replace nospam with yahoo
Its hardcoded. I believe after 50 words the rank drops off to 0. I also
believe that after 1366 (or some large number of words like that) you will
no longer get a hit.
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
"kellygreer1" <kellygreer1@.yahoo.com> wrote in message
news:1122912214.203288.58290@.g47g2000cwa.googlegro ups.com...
> Hello group,
> Does anyone know how near a word needs to be to another word to be
> included in the results of a CONTAINS search that uses NEAR? Is this
> setting adjustable? Is is stored in the registry? INI or config file?
> I'm using SQL Server 7 SP3.
> Thanks,
> Kelly Greer
> KellyGreer1@.nospam.com
> replace nospam with yahoo
>
|||Kelly,
Q. Does anyone know how near a word needs to be to another word to be
included in the results of a CONTAINS search that uses NEAR?
A. Within 50 non-noise words. Additionally, end-of-sentence and
end-of-paragraph also have an effect on the "nearness" of one word or phrase
to another word or phrase.
Q. Is this setting adjustable?
A. No. This is hard-coded.
Q. Is it stored in the registry? INI or config file?
A. No and No. Although, I would hope in some future SQL Server version
(post-SQL Server 2005) that this would be possible, IMHO.
Regards,
John
SQL Full Text Search Blog
http://spaces.msn.com/members/jtkane/
"kellygreer1" <kellygreer1@.yahoo.com> wrote in message
news:1122912214.203288.58290@.g47g2000cwa.googlegro ups.com...
> Hello group,
> Does anyone know how near a word needs to be to another word to be
> included in the results of a CONTAINS search that uses NEAR? Is this
> setting adjustable? Is is stored in the registry? INI or config file?
> I'm using SQL Server 7 SP3.
> Thanks,
> Kelly Greer
> KellyGreer1@.nospam.com
> replace nospam with yahoo
>

Question about Proximity (NEARness) with Full Text Indexing on SQL Server 7

Hello group,

Does anyone know how near a word needs to be to another word to be
included in the results of a CONTAINS search that uses NEAR? Is this
setting adjustable? Is is stored in the registry? INI or config file?

I'm using SQL Server 7 SP3.

Thanks,
Kelly Greer
KellyGreer1@.nospam.com
replace nospam with yahooIts hardcoded. I believe after 50 words the rank drops off to 0. I also
believe that after 1366 (or some large number of words like that) you will
no longer get a hit.

--
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
"kellygreer1" <kellygreer1@.yahoo.com> wrote in message
news:1122912214.203288.58290@.g47g2000cwa.googlegro ups.com...
> Hello group,
> Does anyone know how near a word needs to be to another word to be
> included in the results of a CONTAINS search that uses NEAR? Is this
> setting adjustable? Is is stored in the registry? INI or config file?
> I'm using SQL Server 7 SP3.
> Thanks,
> Kelly Greer
> KellyGreer1@.nospam.com
> replace nospam with yahoo|||Kelly,
Q. Does anyone know how near a word needs to be to another word to be
included in the results of a CONTAINS search that uses NEAR?
A. Within 50 non-noise words. Additionally, end-of-sentence and
end-of-paragraph also have an effect on the "nearness" of one word or phrase
to another word or phrase.

Q. Is this setting adjustable?
A. No. This is hard-coded.

Q. Is it stored in the registry? INI or config file?
A. No and No. Although, I would hope in some future SQL Server version
(post-SQL Server 2005) that this would be possible, IMHO.

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

"kellygreer1" <kellygreer1@.yahoo.com> wrote in message
news:1122912214.203288.58290@.g47g2000cwa.googlegro ups.com...
> Hello group,
> Does anyone know how near a word needs to be to another word to be
> included in the results of a CONTAINS search that uses NEAR? Is this
> setting adjustable? Is is stored in the registry? INI or config file?
> I'm using SQL Server 7 SP3.
> Thanks,
> Kelly Greer
> KellyGreer1@.nospam.com
> replace nospam with yahoo