Hi,
I was wondering how to change what the IndexSearcher maps to? At the moment in IndexQuery.cs maps to a number of properties in the node table, but I also really want to map to the 'shortdescription' field so that I can make my search results SEO friendly. Is there a way of adding another field to be mapped to the IndexSearcher object?
Many thanks
In the current version, you have to change SearchContent, IndexBuilder and the modules that implement ISearchable to add the required fields for indexing. Then you have to change IndexSearcher to return the SEO-friendly url.
In Cuyahoga 2, the content types themselves are responsible for the url that is stored in the index. For example, StaticHtmlContent looks if there is a related node and serves the friendly url of that one for the indexing.
martijnbIn the current version, you have to change SearchContent, IndexBuilder and the modules that implement ISearchable to add the required fields for indexing. Then you have to change IndexSearcher to return the SEO-friendly url.
In Cuyahoga 2, the content types themselves are responsible for the url that is stored in the index. For example, StaticHtmlContent looks if there is a related node and serves the friendly url of that one for the indexing.
I'm going to get the field 'shortdescription' from the 'node' table and add it to the end of the link url. I've added the new field to SearchContent.cs and in the BuildDocumentFromSearchContent() method on IndexBuilder I've added field "doc.Add(Field.Keyword("shortdescription", searchContent.ShortDescription));"
How and what do I change IndexSearcher though as it's a Lucene dll?