Trying to add custom content to search

Hello,

I am trying to make some content from an API available in Telligent's search results. So I followed the documentation here community.telligent.com/.../search and I implemented and released locally. I have the Job scheduler running, but my content is not available via Search. 
More specifically I can't see the GetContentToIndex being called at all. Has any of you managed to implement it this ISearchableContentType interface and find the results in Search?

Thank you for your response

Parents Reply Children
  • We found that this is because the collapse field is required to be added to the indexed content.

    The problem arises because, when using Fiddler to inspect the search request the platform makes to Solr, I noticed that one of the fq parameters was {!collapse field=collapse}. This requires the results to be collapsed, based on the value in the ‘collapse’ field. However, as you are not setting this, it’s excluded from results. Luckily, the fix should be simple. If you add the line highlighted below to your code, once the content is indexed again it should start to show up in results as expected.

     

                foreach (var asset in assets)

                {

                    if (asset == null) { continue; }

                                   searchDocument.AddField(Apis.Get<SearchIndexing>().Constants.CollapseField, "ContentName:" + id);

                   docs.Add(searchDocument);

                }