Free text search on specific field

I have marked a few fields as searchable. Is it possible to use free text search only on a specific field marked as searchable? For example, if I maked ingredients and description as searchable, but I only want to search ingredients.

[241 byte] By [dmsy] at [2008-1-9]
# 1

I haven't tried this yet but I think you can use the CatalogSearchOptions.PropertiesToReturn to "set" which fields are searched. The "null" value returns all searchable properties.

You might also be able to do thisusing the CatalogSearch.SqlWhereClause property.

Jeff Lynch

MVP Windows Server System - Commerce Server

http://codebetter.com/blogs/jeff.lynch

JeffLynch-MVP at 2007-10-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 2
Thanks Jeff. I'll give it a try.
dmsy at 2007-10-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 3

When creating\modifying a property you can specify only a “Free Text Searchable” or “Specification Searchable”. Since you haven’t specified which search method you have select I am going to make an assumption that it’s “Free Text Searchable”.

That said when you enable one or more property for “Free Text Searchable” and perform a search you can't choose which property to search, when calling the API to search it will search both of your fields if you are using the “UseAdvancedFreeTextSearch” to true.

You can use Jeff’s solution to do keyword searches but it will not use SQL Full Text.

Good luck,

-Max

MaxAkbar at 2007-10-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 4

Max,

the field is marked as "Free Text Searchable". Your comment above is not too clear to me. So is it possible to just do a free text search on just one field marked "Free Text Searchable" or searching with free text search will search every field marked "Free Text Searchable"?

dmsy at 2007-10-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 5

Every field marked "Free Text Searchable" will be searched.

-Max

MaxAkbar at 2007-10-3 > top of Msdn Tech,Commerce Server,Commerce Server 2007...