+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Search Service Indexing Comments

Search Service Indexing Comments

6 posts, 0 answered
  1. Audreyn Justus
    Audreyn Justus avatar
    8 posts
    Registered:
    12 Oct 2005
    14 Apr 2010
    Link to this post
    The Search index service does not ignore comments (<!-- xxx -->) into html code. There is a way to prevent this behavior? 

    Regards
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    14 Apr 2010
    Link to this post
    Hello Audreyn Justus,

    There is a searchInputValidation that could be set in the web.config

    <searchInputValidation>
                <add matchPattern="\A[\*\?\~][^\s]*" replacementString="" enabled="true" matchAlert="You can not start your query using wildcards, modify your query and try again.."/>
                <add matchPattern="[\!\^\(\)\{\}\[\]]" replacementString="" enabled="true" matchAlert="Strange characters should be enclosed between double quotation, modify your query and try again.."/>
            </searchInputValidation>


    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Audreyn Justus
    Audreyn Justus avatar
    8 posts
    Registered:
    12 Oct 2005
    14 Apr 2010
    Link to this post
    Thanks Ivan

    I believe I not express myself correctly.  For example the html fragment bellow.
    <!--
    <h3 class="h3up">  
    This text may not be indexed anymore. It´s commented. 
    </h3>  
    -->
    The search service index all the words between the comments , what, I believe, it´s a undesirable behavior. If I search for the words "indexed anymore" for example, the result will bring the page with the commented code.

  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Apr 2010
    Link to this post
    Hello Audreyn Justus,

    Thank you for clarifying the issue. What you can do in the case would be to set the search indexer not to index elements having a specific attribute. For example you can set the class attribute of the commented element to commented (class="commented"), then go to ~/App_Data/Search/[your index name]/fieldsInfoProvider.xml file and add another field which is not going to be indexed:
    <field name="comment" weight="-1" indexAttribute="" filterTag="" filterAttributes="class:commented;"></field>

    Greetings,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Audreyn Justus
    Audreyn Justus avatar
    8 posts
    Registered:
    12 Oct 2005
    14 Apr 2010
    Link to this post
    Thank you Radoslav.

    It will do the job.

    In the version 4.0  there will be new search engine? Otherwise it would be nice that commments are strip out automatically in the next release.

    Best Regards.
  6. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Apr 2010
    Link to this post
    Hi Audreyn Justus,

    We are going to use the same engine for search, however most of the functionality will be rewritten. I will relay this to our team when they start implementing the search.

    Sincerely yours,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
6 posts, 0 answered