Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Nov 12, 2012 @ 10:58
    Ismail Mayat
    0

    Examine low level lucene field access

    Guys,

    Possibly more a question for Shannon or Slace. However does anyone know how to get lucene field access before item ends up in index?  I have tried some of the low level events like DocumentWriting but no avail. What I want to do is for a given date field set it to not analysed. So in the bowels of Examine you will have code like

    Document doc = new Document();
    doc.add(new Field("id"),nodeid,Field.Store.YES,Field.Index.NOT_ANALYSED))

     

    Please note this is just code ripped from lucene in action book but examine will have some similar code. So what i want is to get the document and the fields then update just before it goes into the index. I suspect you cannot do this but thought i would ask. Darren Ferguson asked me a similar question at the recent UK umbraco festival.  I suggested for his particular issue he could add attribute EnableSorting="true" in ExamineIndex.config to your field in IndexUserFields that will create a new field __whatever in the index and that would not be analysed.  In my case I have IndexUserFields blank so all fields will be in index I don't want to mess around and just put all fields in just so that i can set one field to EnableSorting="true"

    Regards

     

    Ismail

Please Sign in or register to post replies

Write your reply to:

Draft