[SOLVED] Problem with FullText

Posts   
 
    
RichMercer
User
Posts: 26
Joined: 24-May-2004
# Posted on: 01-Nov-2004 11:21:05   

I am struggling with the new FullText implementation. I have an ArticleCollection object with a FullTextIndex on it and I simply want to filter using the FullTextIndex but the new predicate expression for Fulltext doesn't seem to relate to T-SQL.

Here's my predicate expression:

bucket.PredicateExpression.Add(new FieldFullTextSearchPredicate( EntityFieldFactory.Create(ArticleFieldIndex.Text), null, FullTextSearchOperator.Freetext, "beet"));

Now in SQL, you query by joining the FreeTextTable and declaring the FreeTextTable name and search text. Here, you are only stating a column you want to query on. The only example I can find in the documentation is for FullTextSearchOperator.Contains not for FullTextSearchOperator.Freetext. I hope I explained that ok? Some help please would be much appreciated.

Thanks Frans

RichMercer
User
Posts: 26
Joined: 24-May-2004
# Posted on: 01-Nov-2004 11:43:42   

After doing some more hunting around, it looks like Freetexttable searches are not available through LLBLGen. I need to take this approach as I need my results sorted by rank. Looks like I'll have to stick to SP's for now.

Is this something we can expect to see in future versions?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 01-Nov-2004 11:55:43   

It should be possible through the predicate, if not I'll change the inner code. What is required additionally to what is offered now, in terms of commands? As I understood the documentation of free text search, the freetext search is: FREETEXT(column, command). So you specify the command (or query) as a parameter to the predicate and I'll add it as the second parameter to the FREETEXT() statement.

Could you please explain to me what additional statements I have to add so I can add them to the predicate? simple_smile A predicate which advertises that it should do the job but fails, is not good simple_smile

(edit) I see you refer to FREETEXTTABLE(), and not to FREETEXT(). Is that correct? If so, indeed FREETEXTTABLE is not implemented in the predicate. You want that added?

Frans Bouma | Lead developer LLBLGen Pro
RichMercer
User
Posts: 26
Joined: 24-May-2004
# Posted on: 01-Nov-2004 12:02:59   

That right, I'm after Freetexttable. When I was writing the first post my head was all over the place (early Monday morning syndrome wink ).

If freetexttable functionality could be added that would be great. At the moment, all my free text searches are done in SP but I loose a lot of consistency in my code doing that, not to mention paging features, and now I need to extend the search functionality and it's much easier done using LLBLGen.

Thanks again Frans.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 01-Nov-2004 18:14:23   

I now check the syntaxis of FREETEXTTABLE() and it is used in a join always. This is hard to add, as joins are formulated with relations, and the filter is specified with predicates.

You want to use FREETEXTTABLE to get back the pagerank?

Frans Bouma | Lead developer LLBLGen Pro
RichMercer
User
Posts: 26
Joined: 24-May-2004
# Posted on: 02-Nov-2004 10:36:56   

Otis wrote:

I now check the syntaxis of FREETEXTTABLE() and it is used in a join always. This is hard to add, as joins are formulated with relations, and the filter is specified with predicates.

You want to use FREETEXTTABLE to get back the pagerank?

That's right. We need to have our results sorted in their rank order so Freetext isn't really suitable for this application.

It would be great if we could have this at some point but I need it for the current project very soon (like today wink ) so I'll go with SP's for this one.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 02-Nov-2004 11:13:53   

Ok simple_smile . I've added to the todo to look into the possibility to sort on pagerank, as I think that's the main purpose of FreeTextTable. Perhaps there are other ways to get the pagerank, if so they'll be added (but not today, I'm sorry wink )

Frans Bouma | Lead developer LLBLGen Pro
RichMercer
User
Posts: 26
Joined: 24-May-2004
# Posted on: 02-Nov-2004 12:57:13   

That's great, thanks.

There isn't any other way to get the rank though (well, only by using containstable, which is basically the same).

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39912
Joined: 17-Aug-2003
# Posted on: 02-Nov-2004 13:10:00   

RichMercer wrote:

That's great, thanks.

There isn't any other way to get the rank though (well, only by using containstable, which is basically the same).

Hmm. I was already afraid of that. disappointed . Well I'll find a way wink

Frans Bouma | Lead developer LLBLGen Pro