This project is read-only.

Custom Indexing

Topics: General, Writing modules
Aug 30, 2012 at 4:33 PM

I've created a custom content type which containg a titlepart, autoroutepart and a custompart called DynamicsNavItemPart.

A webservice is called using the scheduling, which creates my content items, or updates them if they already exist.

Working great so far :)

Next thing I want to do is be able to search the content, now my DynamicsNavPart has 2 fields, ItemNo and Description, so ideally I want to be able to search these.
I have had a little look around in other modules and thought I was onto something my handler contains the following code


            OnIndexing<DynamicsNavItemPart>((context, part) => context.DocumentIndex
                                        .Add("Description", part.Record.Description).Analyze()
                                        .Add("ItemNo", part.Record.ItemNo).Analyze());

Sadly when I go into search fields it doesnt list my 2 new fields - I have obviously missed something - can anyone give me some pointers please?




Sep 3, 2012 at 2:32 PM

Is this not possible?

Sep 4, 2012 at 3:23 AM

Make sure your content type is marked for index in the content types manager.  You may need to rebuild the index afterwards to pick up your already created records.  

If you did this already....then I'm not sure.  

Sep 6, 2012 at 5:21 PM

Thanks - feel such a fool, must have looked at the Content Type edit page a million times but never noticed that little tick box. I now have a task service connecting to our back end system and syncing with the products... and now i can search them in orhard too :)