Changing Name of Indexed Field in Lucene.

Topics: Customizing Orchard
Nov 5, 2013 at 2:12 PM
We are having an issue with the way Lucene is indexing certain fields. We have a bunch of custom types and parts, all were created through Orchard Admin UI. We have an InfoPart that contains an enumeration field of Region. When we attach this part to the content type of Golf, and set this field to be indexed, it indexes it as "golf-region". Is there a way to make the field name "info-region" or just "region"?

We are running Orchard 1.7. I have tried to create the Part and Part Record classes in code and then write a handler to change the OnIndexing function, but I cannot get it to work. In the Settings/Index it does not show the new field name. Also, when filtering in our Search Service class, it does not work as well.

Alternately, if there is a way to make the Lucene query perform an OR, for all these regions, that would work for us too.
Nov 5, 2013 at 6:15 PM
in the content type definition, in the field's option, there is a checkbox to select in order for your own code to save the index information
Nov 5, 2013 at 7:34 PM
I have that option checked already. I see nothing new that was added in the UI under my part.


The field is being indexed as <ContentType>-region. I am trying to get to to be <ContentPart>-region or just region. The field is on an InfoPart which is then tied to multiple content types.