10

Closed

Full-text searching

description

Full-text searching of forums to which a user has List permission access should be provided through a simple search box, to search a topic's subject, body, and the subjects and bodies of any reply messages. Search results should list specific matching topics (which may actually have matched a reply within the topic), and clicking a topic from these search results should highlight the search phrase, perhaps also causing the browser to scroll to the first occurance, when loading up the topic detail view.
Closed Jul 9, 2012 at 4:08 PM by jorgebg
Implemented with Lucene.NET on default branch

comments

seanmcelroy wrote Jun 17, 2011 at 5:36 PM

Hmm, there's going to be a complication here for SQL Server due to the current schema. Specifically:


CREATE FULLTEXT CATALOG [UserContentCatalog] WITH ACCENT_SENSITIVITY = OFF
AS DEFAULT
GO
CREATE FULLTEXT INDEX ON dbo.Topics (TopicTitle, TopicDescription)
KEY INDEX PK_Topics
WITH STOPLIST = SYSTEM;
GO
CREATE FULLTEXT INDEX ON dbo.[Messages] (MessageBody)
KEY INDEX PK_Messages
WITH STOPLIST = SYSTEM;
GO

Yields

Msg 7653, Level 16, State 2, Line 2
'PK_Messages' is not a valid index to enforce a full-text search key. A full-text search key must be a unique, non-nullable, single-column index which is not offline, is not defined on a non-deterministic or imprecise nonpersisted computed column, does not have a filter, and has maximum size of 900 bytes. Choose another index for the full-text key.

It looks like we'd need to add a new identity column to dbo.[Messages] as a unique index to Message for the purposes of allowing SQL Server backend users easily build a full-text index catalog for fast searching.

seanmcelroy wrote Jun 17, 2011 at 11:10 PM

I have committed DbUp .0019 that includes this schema change and the addition of a new sproc to allow for FTI searching to my fork. I plan to implement this feature next week.

jorgebg wrote Jun 20, 2011 at 6:06 PM

Hi Sean!
About the feature for Nearforums, I agree that we should enable full-text indexing by having a unique single column key.
But for your project I would suggest you that you use Google Custom Search or Yahoo! BOSS, that give better results by assigning an ranking and semantic queries funcionality...
Kind regards,
Jorge

dubeaud wrote Dec 14, 2011 at 9:11 PM

Eventually if you wish to implement this, you could use Lucene.NET for a search engine as apposed to full-text within MSSQL.

Irbanjit wrote Jan 19, 2012 at 11:33 PM

I vote for Lucene.NET as search engine for this forum.

It is a great forum but I can't use it without the search feature. Search feature is must have on any forum!

jorgebg wrote Jan 20, 2012 at 9:54 AM

I agree: Search feature is a must have and Lucene.Net is the way to go!
I'm renaming this item to "Built in search engine"

AdamCPID wrote May 1, 2012 at 2:40 AM

Agreed. Great forum, but without a search I can't use it.