Tridion Docs ContentManager custom field is not appeared in solr's index files

[background info]

  • Our company is using SDL Tridion Docs version 13.0.4630.2
  • The TridonDocs frontend application, Solr service, database are running on one single server host.

[goal]

  • to successfully perform searching on my customized field.

[steps I've tried]

  • I have added a custom field FMYTOPICTAG (logical multivalue string) to store tag information of each topic, and have set some tags for few topics for testing.
  • I have configured MetadataConfig.xml, and the custom field is able to show in  ContentManager-> Adcanced Search form.
    • when I add two tags in query box and hit "search", I can find related log information in X:\Infoshare\Data\Logs\InfoshareWS_xxx.log (see appendix)
    • meanwhile, I can find related log information in X:\Infoshare\Data\Logs\JettySolrLucence.stderrout_xxx.log (see appendix)
  • I have modified X:\Infoshare\Data\TrisoftSolrLucence\SolrLucenceCatalog\conf\schema.xml
    • added <field name="LOG_FMYTOPICTAG_STRMV" type=string indexed="true" multiValued="true" required="false">
  • I have performed unregister/register crawler, clean up data folder, reindexing. (which is scripts in X:\Infoshare\App\Crawler\Configuration\)
  • I have performed COM+ Application restart, TrisoftAppPool restart.

[symptom]

  • Content manager indicates that no searching result matched.
  • I found that the text "FMYTOPICTAG" is never appeared in all files under X:\Infoshare\Data\TrisoftSolrLucence\SolrLucenceCatalog\AllVersions, which means the new field is not sucessfully indexed by Solr.

I can successfully query by tags using IshRemote powershell scripts, therefore there must something wrong with solr's configuration.

How should I configure solr-related functions?

---

Appendix: X:\Infoshare\Data\Logs\JettySolrLucence.stderrout_xxx.log
Jan 29, 2024 4:37:29 PM org.apache.solr.core.SolrCore execute
INFO: [AllVersions] webapp=/solr path=/admin/logging params={wt=json&since=0} status=0 QTime=1
Jan 29, 2024 4:37:31 PM org.apache.solr.core.SolrCore execute
INFO: [AllVersions] webapp=/solr path=/admin/properties params={wt=json} status=0 QTime=10
Jan 29, 2024 5:07:20 PM org.apache.solr.core.SolrCore execute
INFO: [LatestVersion] webapp=/solr path=/select params={q=((LOG_FMTOPICTYPE_TEXT_METADATA:tagid01+OR+LOG_FMTOPICTYPE_TEXT_METADATA:tagid02))&fl=ISHTYPE,+LOG_CARD_ID,+VER_CARD_ID,+LNG_CARD_ID,+score,+LNG_FMAPID_STR&fq=((READ-ACCESS:ISRALL+OR+READ-ACCESS:ISR5458+OR+READ-ACCESS:ISR5459+OR+READ-ACCESS:ISR5433)+AND+(ISHTYPE:ISHIllustration+OR+ISHTYPE:ISHLibrary+OR+ISHTYPE:ISHMasterDoc+OR+ISHTYPE:ISHModule+OR+ISHTYPE:ISHTemplate)+AND+ID:*%3Dzh_CN%3D*)&sort=score+desc&rows=300} hits=0 status=0 QTime=20

Appendix: X:\Infoshare\Data\Logs\InfoshareWS_xxx.log

17:07:20.6009 Debug 13 00008 a:UC API25/Search/PerformSearch Trisoft.InfoShare.API25.Search.PerformSearch(maxHitsToReturn=[300],xmlSearchQuery=[<?xml version="1.0" encoding="utf-16"?><ishquery><and><ishfield name="FMTOPICTYPE" level="logical" ishoperator="contains">tagid01, tagid02</ishfield></and><ishsort><ishsortfield name="ISHSCORE" ishorder="d" /></ishsort><ishobjectfilters><ishversionfilter>LatestVersion</ishversionfilter><ishtypefilter>ISHIllustration</ishtypefilter><ishtypefilter>ISHLibrary</ishtypefilter><ishtypefilter>ISHMasterDoc</ishtypefilter><ishtypefilter>ISHModule</ishtypefilter><ishtypefilter>ISHTemplate</ishtypefilter><ishlanguagefilter>zh_CN</ishlanguagefilter></ishobjectfilters></ishquery>]) [MethodEnter(00159)]
17:07:20.6179 Info 13 00008 a:UC:lihao.lei API25/Search/PerformSearch Trisoft.InfoShare.Configuration.Setup.Search.SupportedLanguage.get_Item Adding supported language 'ZH' []
17:07:20.6597 Debug 13 00008 a:UC:lihao.lei API25/Search/PerformSearch Trisoft.InfoShare.API25.Search.PerformSearch(totalHitsFound=[0]) [MethodExit(00159)] 47ms

  • Really appreciate your well thought out ticket description! Thank you! I would have appreciated it more if it was about a supported product release ;-)

    Looking at your steps

    (A) I doubt about

    • added <field name="LOG_FMYTOPICTAG_STRMV" type=string indexed="true" multiValued="true" required="false">

    This because Solr configuration should not be altered when adding new CMS fields. Your field should automatically be handled under the <dynamicField ... entries. So could your entry actually confuse Solr indexing steps?

    (B) Looking at your actually query, you see it queries for "...LOG_FMTOPICTYPE_TEXT_METADATA..." which means Schema.xml entry <dynamicField name="*_TEXT_METADATA"  type="text_metadata" indexed="true" multiValued="false" stored="false" required="false"/> which makes me think that you did not add it to the CMS as multi-value field but as single value field. Hence your "tagid01tagid02" query term is not hitting exactly.

    Using ISHRemote you can check if it is trully set up as multi-value

    $ishSession = New-IshSession -WsBaseUrl "example.com/.../"
    Get-IshTypeFieldDefinition -IshSession $ishSession | Out-GridView

    I expect to see an -n, where first character is Mandatory (M) or not (-) and second character is single-value (1) or multi-value (n). Something like
    Screenshot of ISHRemote command output showing a field definition with type 'String', an 'S' indicating not mandatory, and '-n' indicating multi-value.

    Summarized, please remove your schema.xml configuration and double check your CMS field creation.

    Best wishes,
    Dave

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 6:54 AM (GMT 0) on 5 Mar 2024]
  • Hi Dave,

    Very much thank you! I have resolved my problem according to your suggestion, here is how things goes:

    I tried Get-IshTypeFieldDefinition -IshSession $ishSession | Out-GridView  that you provided. In the grid view I found my custom field indicates the column "CRUST" as: CRU--

    I speculate the prop "S" stands for "is able to be searched", therefore I use DBUT to get FullExportResults.xml, and found it has "isindexable=false" with my field.

    Then I performed database upgrade, index cleaning & rebuild, service restart. Now I can find FMYTOPICTYPE in the index files, and Content Manager did return the result that I want. Yeah!

    For previous "LOG_FMTOPICTYPE_TEXT_METADATA", maybe solr didn't find the definition from TridionDocs, then fallback to a default configuration which carries the prop:  multiValued="false".

     

    Best regards

    Lihao

    emoji
  • Really appreciate in closing the loop! Thank you. Also secretly glad that somebody liked and used my CRUST acronym :) 

    emoji