Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • TARUN SAHANI 3 posts 73 karma points
    Aug 17, 2018 @ 19:53
    TARUN SAHANI
    0

    Hi All,

    I am using very old Umbraco that is version 4 in which I want by using examine Create search criteria i should skip or remove records which have null or 0 value. I am new to this so wondering how can i do this.

    I am using var query = _searchProvider.CreateSearchCriteria() .NodeTypeAlias(DocTypes.CloudTrigger.ToLowerInvariant()) .And() .Field("regionId", regionId.ToString());

    and my Examine Indexer is

    after running above query I am getting 51 records out of which my 45 records are useless as it has no data.

    Can anyone help me to add any null or zero checks in this?

    Thanks In Advance.

  • Marcio Goularte 374 posts 1346 karma points
    Aug 20, 2018 @ 00:34
    Marcio Goularte
    0

    Hi Tarun,

    Have you tried deleting the index files in the App_Data folder ??

    if not, remove these files restart the application

  • TARUN SAHANI 3 posts 73 karma points
    Aug 20, 2018 @ 04:27
    TARUN SAHANI
    0

    Hi Marcio, Thanks for your response.

    Yes, I tried that but after deleting this I am getting 0 counts. Please suggest something else.

  • Marcio Goularte 374 posts 1346 karma points
    Aug 20, 2018 @ 14:28
    Marcio Goularte
    0

    Tarun, In the config file config/ExamineSettings.config add the property RebuildOnAppStart as below.

    <Examine RebuildOnAppStart="true">
    

    this causes you to examine reindex the content

    Or

    Can do by code

    https://gist.github.com/kevinblake/4000628

    change the indexes by their


    I recommend installing the Examine dashboard package

    https://our.umbraco.com/projects/developer-tools/examine-dashboard/

    With it you can see how the index is and force the indexing

    or

    https://our.umbraco.com/projects/backoffice-extensions/examine-index-admin/

Please Sign in or register to post replies

Write your reply to:

Draft