|
|
|
date: Wed, 2 Apr 2008 12:33:00 -0700,
group: microsoft.public.sqlserver.fulltext
back
Is this only way??
Hi,
I use SQL 2005 FTS.
My requirement is to highlight the search terms.
As you guys probably know, I can't simple use replace method for the search
term to highlight, becuase of lemmatizer and stemmer.
So one thing I could think of is if SQL server returns position data for the
search terms.....I mean...
For example,
"This is a test"
If test is searched vis FTS, the position index would be 10, which is start
index for test.
However, it seems not possible by SQL FTS itself.
According to my research, it seems that I need to implement my own algorithm
like SQL server does for lemmatizer and stemmer to find out what terms FTS
found.
Is this only way?.....then why would we need to use FTS??
Any other alternative way?
Thanks,
...................................................TJ
date: Wed, 2 Apr 2008 12:33:00 -0700
author: TJ
Re: Is this only way??
TJ wrote on Wed, 2 Apr 2008 12:33:00 -0700:
> Hi,
> I use SQL 2005 FTS.
> My requirement is to highlight the search terms.
> As you guys probably know, I can't simple use replace method for the
> search term to highlight, becuase of lemmatizer and stemmer.
> So one thing I could think of is if SQL server returns position data
> for the search terms.....I mean...
> For example,
> "This is a test"
> If test is searched vis FTS, the position index would be 10, which is
> start index for test.
> However, it seems not possible by SQL FTS itself.
> According to my research, it seems that I need to implement my own
> algorithm like SQL server does for lemmatizer and stemmer to find out
> what terms FTS found.
> Is this only way?.....then why would we need to use FTS??
> Any other alternative way?
> Thanks,
> ...................................................TJ
You would need to implement your own highlight algorithm (or look for an
existing on the web), or use a different indexing product that does
highlighting.
You would still use FTS do to the actual searching - just having the
stemming algorithms do the highlighting is much more efficient than trying
to write your own search engine.
--
Dan
date: Thu, 3 Apr 2008 11:23:58 +0100
author: Daniel Crichton
|
|