i'm trying to implement a news section for a site. we are migrating quite alot of old content over and i've decided its probably better to use lucene to index the content for filtering.
the problem i am facing is getting a specific text field out of the datarowview.
my code to retrieve the results is as follows.
using LUKE i am able to inspect the index and i can see all the content stored there, but after i cant seem to retrieve it from the datarowview in the repeater.
string searchText = SearchSyntaxHelper.CombineSearchCondition(GetType(), condition);
SearchParameters parameters = new SearchParameters
SearchFor = searchText,
SearchSort = "prioritise DESC, ##SCORE##",
SearchIndexes = "KRSNewsIndex",
StartingPosition = 0,
DisplayResults = 10,
NumberOfProcessedResults = 100,
NumberOfResults = 0,
var results = CMS.Search.SearchHelper.Search(parameters);
i set the results in a repeater and databind it.
i am able to get my field called "title" out, but description is never retrieved.
DataRowView drv = e.Item.DataItem as DataRowView;
string title = DataHelper.GetNotEmpty(drv["Title"],"");
string description = DataHelper.GetNotEmpty(drv["Description"],"");
what am i doing wrong?