I need to use the new free text search feature.
I understand you must have a full-text enabled DB with a full-text catalog.
I added a [FullText("English")] attribute on a column : a full-text index is then created on this column and I can query it:
Ok, now the big question : have you a recommended way to index a big graph of objects?
Let's say I have a complex business object with several EntitySet that may be changed during the life of the object. As I understand I can only create a full-text index on a column containing text. So I guess the correct way is to create a column containing a full-text dump of all the data to index on the root entity, and refresh it asynchronously when necessary.
Is this correct? Is it how you planned this feature to be used?
Other question if I'm right : What's the correct way to detect an entity (or an entity related to this entity) has been changed and change a field (FullTextShouldBeUpdated for instance)? If I can do that, all what's left to do is to walk the graph to build the complete text to index.
This thread was imported from our support forum. The original discussion may contain more detailed answer.
asked Apr 19 '10 at 15:58
> Is this correct? Is it how you planned this feature to be used?
> What's the correct way to detect an entity (or an entity related to this entity) has been changed and change a field (FullTextShouldBeUpdated for instance)?
You can either override protected Entity / Persistent methods (e.g. OnSetFieldValueCompleted), or subscribe to similar Session events.
Note that ideally you must update the combined full-text data once per transaction. This approach is shown in Audit Sample for DO4.
answered Apr 19 '10 at 18:40