Copied to clipboard

Flag this post as spam?

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


  • Sérgio 30 posts 171 karma points
    Jul 13, 2018 @ 19:34
    Sérgio
    0

    ExamineDB is not populating Index

    Hey everyone.

    I've found out about ExamineDB today, which is exactly what I need for a project I'm working on. I have set everything up, have no errors and the index is built but it's always empty.

    On my ExamineSettings.config file I have added the following for the Index Provider:

    <add name="SageProductsIndexer" type="ExamineDB.Indexers.DBIndexer, ExamineDB"
        indexSet="SageProductsIndexSet"
        nodeType="SageProducts"
        connectionStringName="umbracoDbDSN"
        sql="SELECT ItemID, Description, Barcode FROM dbo.SAGE_Item"
        singleRecordSQL = "SELECT ItemID, Description, Barcode FROM dbo.Sage_Item WHERE ItemID = '@0'"
        primaryKeyField = "ItemID"/>
    

    And the following for the Searcher:

    <add name="SageProductsSearcher" type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine" indexSet="SageProductsIndexSet" />
    

    As for the IndexSet, in the ExamineIndex.config file:

    <IndexSet SetName="SageProductsIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/SageProducts/" />
    

    Like I said, I have no errors. I have installed the ExamineDB Tool as well and I am able to build/rebuild the index.

    The thing is: it's always empty.

    The table has more columns than the ones presented. I am adding them here just for your reference:

    ItemID  nvarchar(25)
    Description nvarchar(255)
    Barcode varchar(50)
    GrossWeight float
    FamilyID    int
    Active  tinyint
    Slug    varchar(255)
    

    Any ideas?

    Thank you all in advance.

  • Sérgio 30 posts 171 karma points
    Jul 18, 2018 @ 21:38
    Sérgio
    0

    I realized the issue has to do with reindexing everything. If I try to index one item at a time, it works.

  • Sérgio 30 posts 171 karma points
    Jul 26, 2018 @ 07:58
    Sérgio
    100

    All right I figured the problem out.

    I started having problems with individual adds to the index. After some investigation I realized some of the IDs were lengthy, which prevented records to be added to the Lucene index.

    Changing the ID field (to an autonumber one) fixed the issue.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Jul 31, 2018 @ 09:35
    Alex Skrypnyk
    1

    Hi Sérgio

    Thanks for sharing solution with the community! Have a great day!

    Alex

  • Sérgio 30 posts 171 karma points
    Jul 31, 2018 @ 09:42
    Sérgio
    0

    Thanks, Alex. This was not an easy one, although the solution was right there.

    Take care!

Please Sign in or register to post replies

Write your reply to:

Draft